Beispiel #1
0
 public static NeuIdentifierExpression ParseIdentifierExpression(
     this NeuParser parser,
     ISourceLocation start,
     NeuIdentifier id)
 {
     return(new NeuIdentifierExpression(
                children: new Node[] { id },
                start: start,
                end: parser.Tokenizer.GetLocation()));
 }
Beispiel #2
0
    public static NeuOperation Execute(
        this NeuInterpreter interpreter,
        NeuIdentifier id)
    {
        var name = id.Source;

        ///

        var v = interpreter.GetVar(name);

        if (v == null)
        {
            throw new Exception();
        }

        ///

        return(v.Value);
    }
Beispiel #3
0
    ///

    public NeuSimpleTypeId(
        NeuIdentifier id)
        : base(new Node[] { id }, new UnknownLocation(), new UnknownLocation())
    {
    }
Beispiel #4
0
 public static void Generate(
     this NeuCodeGenerator generator,
     NeuIdentifier id)
 {
     generator.Append($"{id.Source}");
 }