public ISyntaxTree GetSyntaxTree() { WriteTree tree = new WriteTree(); ExpressionParser expressionParser = new ExpressionParser(Line[0].Element); SyntaxError syntaxError = expressionParser.Check(); if (syntaxError == SyntaxError.NoError) { expressionParser.Normalize(); tree.Childs.Add(expressionParser.GetSyntaxTree()); } else { Console.WriteLine(syntaxError); return(null); } return(tree); }
public SyntaxError Check() { ExpressionParser expressionParser = new ExpressionParser(Line[1].Element); return(expressionParser.Check()); }