示例#1
0
		public JavaScriptAstWalker(
			JavaScriptCompilationUnit compilationUnit,
			JavaScriptAst ast)
		{
			this.compilationUnit = compilationUnit;
			this.ast = ast;
		}
示例#2
0
 public JavaScriptAstWalker(
     JavaScriptCompilationUnit compilationUnit,
     JavaScriptAst ast)
 {
     this.compilationUnit = compilationUnit;
     this.ast             = ast;
 }
示例#3
0
		public ICompilationUnit Parse(IProjectContent projectContent, string fileName, ITextBuffer fileContent)
		{
			var astFactory = new JavaScriptAstFactory(fileContent);
			JavaScriptAst ast = astFactory.Create();
			
			var unit = new JavaScriptCompilationUnit(projectContent, fileName);
			var walker = new JavaScriptAstWalker(unit, ast);
			walker.Walk();
			
			return unit;
		}
示例#4
0
		public ICompilationUnit Parse(IProjectContent projectContent, string fileName, ITextBuffer fileContent)
		{
			try {
				var astFactory = new JavaScriptAstFactory(fileContent);
				JavaScriptAst ast = astFactory.Create();
				
				var unit = new JavaScriptCompilationUnit(projectContent, fileName);
				var walker = new JavaScriptAstWalker(unit, ast);
				walker.Walk();
				
				return unit;
			} catch (Exception ex) {
				LoggingService.Debug(ex.ToString());
			}
			
			return new DefaultCompilationUnit(projectContent) { FileName = fileName };
		}
示例#5
0
        public ICompilationUnit Parse(IProjectContent projectContent, string fileName, ITextBuffer fileContent)
        {
            try {
                var           astFactory = new JavaScriptAstFactory(fileContent);
                JavaScriptAst ast        = astFactory.Create();

                var unit   = new JavaScriptCompilationUnit(projectContent, fileName);
                var walker = new JavaScriptAstWalker(unit, ast);
                walker.Walk();

                return(unit);
            } catch (Exception ex) {
                LoggingService.Debug(ex.ToString());
            }

            return(new DefaultCompilationUnit(projectContent)
            {
                FileName = fileName
            });
        }