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

Наследование: AstNode
Пример #1
0
		/// <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
		private Node TransformRegExp(RegExpLiteral node)
		{
			decompiler.AddRegexp(node.GetValue(), node.GetFlags());
			currentScriptOrFn.AddRegExp(node);
			return node;
		}