public static LolCodeBlock GetNextVariableContext(LolCodeContext ctx) { while(ctx!=null) { if(ctx is LolCodeBlock) { if((ctx as LolCodeBlock)._variables!=null) return (ctx as LolCodeBlock); } ctx = ctx.Parent; } throw new ApplicationException("Can't find context with vars!"); }
public static LolCodeFunction Create(LolCodeContext ctx, string name) { // lookup build-ins... do it in pretty way return new LolCodeFunction(ctx, name); }
private LolCodeFunction(LolCodeContext ctx, string name) : base(ctx) { _name = name; }
public LolCodeContext(LolCodeContext parent) { _parent = parent; }
public LolCodeStatement(LolCodeContext parent) : base(parent) { }
public LolCodeBlock(LolCodeContext parent) : base(parent) { }
public LolCodeExpression(LolCodeContext ctx) : base(ctx) { }