public void ExitUnaryexpression([NotNull] sqfParser.UnaryexpressionContext context) { var node = this.ExitGeneric <SqfUnaryExpression>(context); node.Operator = (context.IDENTIFIER() ?? context.NEGATION() ?? context.OPERATOR()).GetText(); try { node.Expression = node.Children[0]; } catch { this.OtherSyntaxErrors.Add(new SyntaxError() { Col = context.Start.Column, Length = context.GetText().Length, Line = context.Start.Line, Message = "Unknown Error", StartOffset = context.Start.StartIndex }); } }
public void EnterUnaryexpression([NotNull] sqfParser.UnaryexpressionContext context) { this.EnterGeneric(new SqfUnaryExpression(this.Current)); }