Example #1
0
 public SetValueExpression(Id variable, Expression value)
 {
     Variable = variable;
     Value = value;
     AddAttribute(new IdAttr(variable));
     AddChild(value);
 }
Example #2
0
 public VarDeclaration(Terminal type, Id id)
 {
     Type = type;
     Id = id;
     AddAttribute(new TypeAttr(type));
     AddAttribute(new IdAttr(id));
 }
 public GetArrayValueExpression(Id variable, Expression index)
 {
     Variable = variable;
     Index = index;
     AddAttribute(new IdAttr(variable));
     AddChild(index);
 }
Example #4
0
        public FuncDeclaration(Terminal returnType, Id name, ParamDeclaration[] parameters, Block body)
        {
            ReturnType = returnType;
            Params = parameters;
            Body = body;
            Name = name;

            AddAttribute(new TypeAttr(returnType));
            AddAttribute(new IdAttr(name));
            AddAttribute(parameters);
            AddChild(body);
        }
Example #5
0
 public ParamDeclaration(Terminal type, Id id, bool isArray)
 {
     Type = type;
     Id = id;
     IsArray = isArray;
 }
Example #6
0
 public ReadStatement(Id id)
 {
     Id = id;
     AddAttribute(new IdAttr(id));
 }
Example #7
0
 public ArrayDeclaration(Terminal type, Id id, Num size)
     : base(type, id)
 {
     Size = size;
     AddAttribute(new NumAttr(size));
 }
Example #8
0
 public override Symbol GetCopy(string str)
 {
     var id = new Id();
     id.SetValue(str);
     return id;
 }
Example #9
0
 public IdAttr(Id id)
 {
     Id = id;
 }
Example #10
0
 public GetValueExpression(Id variable)
 {
     Variable = variable;
     AddAttribute(new IdAttr(variable));
 }