public override Node VisitString([NotNull] FlyLangParser.StringContext context) { var text = context.GetText(); text = text.Substring(1, text.Length - 2); return(Literal.From(text)); }
public override Node VisitIntLit([NotNull] FlyLangParser.IntLitContext context) { return(Literal.From(int.Parse(context.GetText()))); }
// Handling Literals: public override Node VisitFloatLit([NotNull] FlyLangParser.FloatLitContext context) { return(Literal.From(float.Parse(context.GetText(), CultureInfo.InvariantCulture))); }