mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
bug 590775, r=cdleary: default xml namespace = <<expr>>
This commit is contained in:
parent
71de094573
commit
0039e6bd0d
@ -1884,11 +1884,11 @@ ASTSerializer::statement(JSParseNode *pn, Value *dst)
|
||||
#if JS_HAS_XML_SUPPORT
|
||||
case TOK_DEFAULT:
|
||||
{
|
||||
LOCAL_ASSERT(pn->pn_arity == PN_UNARY && PN_TYPE(pn->pn_kid) == TOK_STRING);
|
||||
LOCAL_ASSERT(pn->pn_arity == PN_UNARY);
|
||||
|
||||
Value ns;
|
||||
|
||||
return literal(pn->pn_kid, &ns) &&
|
||||
return expression(pn->pn_kid, &ns) &&
|
||||
builder.xmlDefaultNamespace(ns, &pn->pn_pos, dst);
|
||||
}
|
||||
#endif
|
||||
|
@ -104,6 +104,7 @@ function xmlElt(contents) Pattern({ type: "XMLElement", contents: contents })
|
||||
function xmlAttr(value) Pattern({ type: "XMLAttribute", value: value })
|
||||
function xmlText(text) Pattern({ type: "XMLText", text: text })
|
||||
function xmlPI(target, contents) Pattern({ type: "XMLProcessingInstruction", target: target, contents: contents })
|
||||
function xmlDefNS(ns) Pattern({ type: "XMLDefaultDeclaration", namespace: ns })
|
||||
|
||||
function assertBlockStmt(src, patt) {
|
||||
blockPatt(patt).assert(Reflect.parse(blockSrc(src)));
|
||||
@ -757,6 +758,8 @@ assertExpr("<{foo}>text</{foo}>", xmlElt([xmlStartTag([xmlEscape(ident("foo"))])
|
||||
xmlEndTag([xmlEscape(ident("foo"))])]));
|
||||
assertExpr("<?xml?>", xmlPI("xml", ""));
|
||||
assertExpr("<?xml version='1.0'?>", xmlPI("xml", "version='1.0'"));
|
||||
assertDecl("default xml namespace = 'js';", xmlDefNS(lit("js")));
|
||||
assertDecl("default xml namespace = foo;", xmlDefNS(ident("foo")));
|
||||
|
||||
// NOTE: We appear to be unable to test XMLNAME, XMLCDATA, and XMLCOMMENT.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user