Esempio n. 1
0
 public Token(string str,CodeData data,ref int column,bool flag)
 {
     this.data = data;
     int fir = column - (flag ? 1 : 0);
     for(;column<str.Length;++column)
     {
         if (flag ? str[column] == '"' : (str[column] == ')' || str[column] == ' ' || str[column] == '#'))
         {
             this.token = str.Substring(fir, column - fir + (flag ? 1 : 0));
             return;
         }
     }
     this.token = str.Substring(fir, column - fir + (flag ? 1 : 0));
 }
Esempio n. 2
0
 public MultiSentence(IEnumerable<Sentence> sentences, CodeData data)
 {
     this.sentences = sentences;
     this.data = data;
 }
Esempio n. 3
0
 public Foreach(string name,Sentence sentence,Expression expr,CodeData data)
 {
     this.name = name;
     this.sentence = sentence;
     this.expr = expr;
     this.data = data;
 }
Esempio n. 4
0
 public YieldReturn(Expression expr,CodeData data)
 {
     this.data = data;
     this.expr = expr;
 }
Esempio n. 5
0
 public Expr(Expression expr,CodeData data)
 {
     this.data = data;
     this.expr = expr;
 }
Esempio n. 6
0
 public Global(string name,Expression expr,CodeData data)
 {
     this.data = data;
     this.name = name;
     this.expr = expr;
 }
Esempio n. 7
0
 public If(IEnumerable<Tuple<Expression, Sentence>> sentences, CodeData data)
 {
     this.data = data;
     this.sentences = sentences;
     this.else_sentence = null;
 }
Esempio n. 8
0
 public While(Expression cond,Sentence source,CodeData data)
 {
     this.data = data;
     this.cond = cond;
     this.source = source;
 }
Esempio n. 9
0
 public For(Sentence source,string name,Expression first,Expression last,Expression step,CodeData data)
 {
     this.data = data;
     this.source = source;
     this.name = name;
     this.first = first;
     this.last = last;
     this.step = step;
 }
Esempio n. 10
0
 public Function(IFunction func,IEnumerable<Expression> exprs,CodeData data)
 {
     this.func = func;
     this.exprs = exprs;
     this.data = data;
 }
Esempio n. 11
0
 public Value(string name, CodeData data)
 {
     this.name = name;
     this.data = data;
 }
Esempio n. 12
0
 public Literal(dynamic value,CodeData data)
 {
     this.data = data;
     this.value = value;
 }
Esempio n. 13
0
 public Token(string token,CodeData data)
 {
     this.token = token;
     this.data = data;
 }
Esempio n. 14
0
 public Tree(List<TokenTree> tree,CodeData data)
 {
     this.tree = tree;
     this.data = data;
 }
Esempio n. 15
0
 public Tree(string str, int line, string filename)
 {
     int column = 0;
     this.tree = InitialParse(str, line, ref column, filename);
     this.data = new CodeData(line, 0, filename);
 }