public void Load(injectionParser.FileContext file) { CurrentScript = new ScriptFile("<script>", file.GetText(), file); interpreter = new ThreadLocal <Interpreter>(() => new Interpreter(Metadata, CurrentScript.FileName, debuggerServer.Create(), retrieveCancellationToken)); Metadata.Reset(); var collector = new DefinitionCollector(Metadata); collector.Visit(file); }
public MessageCollection Load(string content, string fileName) { var parser = new Parser(); CurrentFileSyntax = parser.ParseFile(content, out var errors); CurrentFileName = fileName; Metadata.ResetSubrutines(); var collector = new DefinitionCollector(Metadata); collector.Visit(CurrentFileSyntax); if (errors.Any()) { return(errors); } var sanityAnalyzer = new SanityAnalyzer(); return(sanityAnalyzer.Analyze(CurrentFileSyntax, Metadata)); }
public MessageCollection Load(string content, string fileName) { var parser = new Parser(); var syntax = parser.ParseFile(content, out var errors); CurrentScript = new ScriptFile(fileName, content, syntax); interpreter = new ThreadLocal <Interpreter>(() => new Interpreter(Metadata, CurrentScript.FileName, debuggerServer.Create(), retrieveCancellationToken)); Metadata.Reset(); var collector = new DefinitionCollector(Metadata); collector.Visit(CurrentScript.Syntax); if (errors.Any()) { return(errors); } var sanityAnalyzer = new SanityAnalyzer(); return(sanityAnalyzer.Analyze(CurrentScript.Syntax, Metadata)); }
public void Load(injectionParser.FileContext file) { var collector = new DefinitionCollector(Metadata); collector.Visit(file); }