2 using System.Collections.Generic;
\r
5 namespace NT2chCtrl.html.js
\r
7 partial class JsParser
\r
9 //List<JsFunction> mBodyLvlFunc = new List<JsFunction>();
\r
10 List<JsRootFunction> mFuncList = new List<JsRootFunction>();
\r
11 //HtmlElement mRootElement;
\r
12 public bool PreCompile(DebugContext ctx , HtmlElement jsElem)
\r
14 string[] contents = jsElem.getStringContent();
\r
15 if (contents == null || contents.Length != 1)
\r
18 JsRootFunction rootFunc = new JsRootFunction(ctx.mCurrentLine, 0);
\r
19 if (rootFunc.Parse(ctx, contents[0]))
\r
21 mFuncList.Add(rootFunc);
\r
30 public bool run(DebugContext dCtx, HtmlElement rootElement, out JsFunctionContext fCtx)
\r
33 if (mFuncList.Count == 0)
\r
36 foreach (JsRootFunction func in mFuncList)
\r
38 fCtx = new JsFunctionContext(dCtx);
\r
39 if (func.getInstaructionCount() > 0 &&
\r
40 null == func.Execute(fCtx, rootElement))
\r