private IAstNode GetCaseStatement() { ParserHelper.PreMessage<SwitchStatement>(DataSource); var caseStatement = new CaseStatement(); var caseValue = caseStatement.CaseValue; Debug.Assert(CurrentInputElement is KeywordToken); Debug.Assert(CurrentInputElement.Data == Keywords.Case); MoveToNextToken(); while (CurrentInputElement.Data != ":") { caseValue.Add(CurrentInputElement); MoveToNextToken(); } Debug.Assert(CurrentInputElement is OperatorToken); Debug.Assert(CurrentInputElement.Data == ":"); MoveToNextToken(); ParserHelper.PostMessage<SwitchStatement>(caseStatement); return caseStatement; }
public CaseStatementCompiler(ICompiler compiler, CaseStatement caseStatement) { _compiler = compiler; _caseStatement = caseStatement; }