public virtual object Walk(LoadStatement node) { if (Enter(node)) { node.CodeFile.Accept(this); } Exit(node); return(null); }
private LoadStatement ParseLoadStatement() { var import = new LoadStatement { Token = Next() }; Match(TokenType.Load); import.CodeFile = ParseAssignmentExpression(); Match(TokenType.SemiColon); return(import); }
public override object Walk(LoadStatement node) { var file = node.CodeFile.Accept(this); if (!(file is BikeString)) { throw ErrorFactory.CreateTypeError("'load' works only with string type"); } var path = ((BikeString)file).Value; if (string.IsNullOrWhiteSpace(path)) { throw ErrorFactory.CreateLoadError(path); } if (Path.GetExtension(path).ToUpperInvariant() == ".BK") { return(LoadAndExecute(path)); } Context.ImportAssembly(path); return(null); }
public override void Exit(LoadStatement node) { level--; }
public override bool Enter(LoadStatement node) { Print("ReferenceStatement"); level++; return true; }
public virtual void Exit(LoadStatement node) { }
public virtual bool Enter(LoadStatement node) { return true; }
public virtual void Exit(LoadStatement node) { }
public virtual bool Enter(LoadStatement node) { return(true); }
public override void Exit(LoadStatement node) { level--; }
public override bool Enter(LoadStatement node) { Print("ReferenceStatement"); level++; return(true); }
public override object Walk(LoadStatement node) { var file = node.CodeFile.Accept(this); if (!(file is BikeString)) throw ErrorFactory.CreateTypeError("'load' works only with string type"); var path = ((BikeString)file).Value; if (string.IsNullOrWhiteSpace(path)) throw ErrorFactory.CreateLoadError(path); if (Path.GetExtension(path).ToUpperInvariant() == ".BK") { return LoadAndExecute(path); } Context.ImportAssembly(path); return null; }
private LoadStatement ParseLoadStatement() { var import = new LoadStatement { Token = Next() }; Match(TokenType.Load); import.CodeFile = ParseAssignmentExpression(); Match(TokenType.SemiColon); return import; }
public virtual object Walk(LoadStatement node) { if (Enter(node)) { node.CodeFile.Accept(this); } Exit(node); return null; }