public BlockAnalyzer(LookAheadLangParser parser, IFunctionStream functionStream = null, OnLocalFunctionDelegate onLocalFunctionDelegate = null) { this.parser = parser; this.conditionalsWithExpressions = new List <string>( new string[] { "if", "while", "foreach", "for", "else if", }); this.branchPointKeywords = new List <string>( new string[] { "case", "catch" }); this.functionStream = functionStream; this.onLocalFunctionDelegate = onLocalFunctionDelegate; }
public BlockAnalyzer(LookAheadLangParser parser, IFunctionStream functionStream = null, OnLocalFunctionDelegate onLocalFunctionDelegate = null, ParserSwitchBehavior switchBehavior = ParserSwitchBehavior.TraditionalInclude) { this.parser = parser; this.conditionalsWithExpressions = new List<string>( new string[] { "if", "while", "foreach", "for", "else if", }); this.branchPointKeywords = new List<string>(new string[] { "catch" }); if (switchBehavior == ParserSwitchBehavior.TraditionalInclude) this.branchPointKeywords.Add("case"); this.functionStream = functionStream; this.onLocalFunctionDelegate = onLocalFunctionDelegate; }
public BlockAnalyzer(LookAheadLangParser parser, IFunctionStream functionStream = null, OnLocalFunctionDelegate onLocalFunctionDelegate = null, ParserSwitchBehavior switchBehavior = ParserSwitchBehavior.TraditionalInclude) { this.parser = parser; this.conditionalsWithExpressions = new List <string>( new string[] { "if", "while", "foreach", "for", "else if", }); this.branchPointKeywords = new List <string>(new string[] { "catch" }); if (switchBehavior == ParserSwitchBehavior.TraditionalInclude) { this.branchPointKeywords.Add("case"); } this.functionStream = functionStream; this.onLocalFunctionDelegate = onLocalFunctionDelegate; }