Save
This commit is contained in:
20
Convention/[RScript]/Matcher/NamespaceMater.cs
Normal file
20
Convention/[RScript]/Matcher/NamespaceMater.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
namespace Convention.RScript.Matcher
|
||||
{
|
||||
public class NamespaceMater : IRSentenceMatcher
|
||||
{
|
||||
public bool Match(string expression, ref RScriptSentence sentence)
|
||||
{
|
||||
if (expression == "{")
|
||||
{
|
||||
sentence.mode = RScriptSentence.Mode.EnterNamespace;
|
||||
return true;
|
||||
}
|
||||
else if (expression == "}")
|
||||
{
|
||||
sentence.mode = RScriptSentence.Mode.ExitNamespace;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user