AST node for a RegExp literal.
AST node for a RegExp literal. Node type is Rhino.Token.REGEXP .

Inheritance: AstNode
コード例 #1
0
ファイル: ScriptNode.cs プロジェクト: hazzik/Rhino.Net
		/// <summary>Called by IRFactory to add a RegExp to the regexp table.</summary>
		/// <remarks>Called by IRFactory to add a RegExp to the regexp table.</remarks>
		public virtual void AddRegExp(RegExpLiteral re)
		{
			if (re == null)
			{
				CodeBug();
			}
			if (regexps == null)
			{
				regexps = new List<RegExpLiteral>();
			}
			regexps.Add(re);
			re.PutIntProp(REGEXP_PROP, regexps.Count - 1);
		}
コード例 #2
0
ファイル: IRFactory.cs プロジェクト: hazzik/Rhino.Net
		private Node TransformRegExp(RegExpLiteral node)
		{
			decompiler.AddRegexp(node.GetValue(), node.GetFlags());
			currentScriptOrFn.AddRegExp(node);
			return node;
		}