public override QlExpression VisitStringLiteral(QlParser.StringLiteralContext context) { string text = context.GetText(); if (text.Length < 2 || text[0] != '\'' || text[text.Length - 1] != '\'') { throw new NFSdbSyntaxException(string.Format("invalid string literal '{0}'", text), context.start.Line, context.start.Column); } return(new LiteralExpression(Expression.Constant(text.Substring(1, text.Length - 2)), context.ToQlToken())); }
public override AstNode VisitStringLiteral([NotNull] QlParser.StringLiteralContext context) { return(new StringLiteral(context.GetText())); }