Ejemplo n.º 1
0
        public override Node VisitString([NotNull] FlyLangParser.StringContext context)
        {
            var text = context.GetText();

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