void IRule.CreateScript(IGrammar grammar, string rule, string method, RuleMethodScript type) { switch (type) { case RuleMethodScript.onInit: _onInit = method; break; case RuleMethodScript.onParse: _onParse = method; break; case RuleMethodScript.onRecognition: _onRecognition = method; break; case RuleMethodScript.onError: _onError = method; break; default: // unknown method!!! System.Diagnostics.Debug.Assert(false); break; } }
void IRule.CreateScript(IGrammar grammar, string rule, string method, RuleMethodScript type) { switch (type) { case RuleMethodScript.onInit: _onInit = method; break; case RuleMethodScript.onParse: _onParse = method; break; case RuleMethodScript.onRecognition: _onRecognition = method; break; case RuleMethodScript.onError: _onError = method; break; } }
void IRule.CreateScript(IGrammar grammar, string rule, string method, RuleMethodScript type) { ((GrammarElement)grammar).CustomGrammar._scriptRefs.Add(new ScriptRef(rule, method, type)); }
internal ScriptRefStruct(string rule, RuleMethodScript method) { _rule = rule; _method = method; }
internal ScriptRef(string rule, string sMethod, RuleMethodScript method) { _rule = rule; _sMethod = sMethod; _method = method; }