public CodeBodyParser(TokenStream<String> tokens, CodeBody body, SymbolTable symbols, ASTNode containingNode, MessageLog log = null) { Log = log ?? new MessageLog(); Symbols = symbols; Tokens = tokens; _loopCount = 0; _switchCount = 0; Node = containingNode; Body = body; OuterClassScope = NodeUtils.GetOuterClassScope(containingNode); // TODO: refactor a better solution to this mess if (IsState) NodeVariables = (containingNode as State); else if (IsFunction) NodeVariables = (containingNode as Function); else if (IsOperator) NodeVariables = (containingNode as OperatorDeclaration); }
public CodeBodyParser(TokenStream <String> tokens, CodeBody body, SymbolTable symbols, ASTNode containingNode, MessageLog log = null) { Log = log ?? new MessageLog(); Symbols = symbols; Tokens = tokens; _loopCount = 0; _switchCount = 0; Node = containingNode; Body = body; OuterClassScope = NodeUtils.GetOuterClassScope(containingNode); // TODO: refactor a better solution to this mess if (IsState) { NodeVariables = (containingNode as State); } else if (IsFunction) { NodeVariables = (containingNode as Function); } else if (IsOperator) { NodeVariables = (containingNode as OperatorDeclaration); } }