Exemple #1
0
 public void Init(LexInfos lexInfos, Action funcSyntaxIndent)
 {
     this.LexInfos          = lexInfos;
     this.filePath          = lexInfos.filePath;
     this._funcSyntaxIndent = funcSyntaxIndent;
     _domains = new Stack <SymDomain>();
     _optop   = new Operand();
     _gDomain = new SymDomain();
     PushDomain(_gDomain);
     TypeContainer = new TypeRegister(_gDomain);
 }
Exemple #2
0
 public void Reset()
 {
     str2Token         = new Dictionary <string, Token>();
     allTokens         = new List <Token>();
     sourcestr         = new DynString();
     tkstr             = new DynString();
     LexInfos          = new LexInfos(allTokens);
     LexInfos.filePath = filePath;
     allTokens.AddRange(keywords);
     for (int i = 0; i < keywords.Length; i++)
     {
         str2Token.Add(keywords[i].name, keywords[i]);
     }
 }