Bug 924397 - WebIDL parser doesn't specify file when encountering syntax error at end of file. r=jdm
authorTareq Khandaker <tareqakhandaker@gmail.com>
Fri, 18 Oct 2013 10:17:00 -0400
changeset 151346 48d6dad2df1630c9ca59755f5948024c6d2e2aec
parent 151345 5def33b076d6feb38bd8e71187d67d1abd1e1e74
child 151347 9475a31892560d0afd2b9b7e4c8d310dfe364344
push id25484
push userryanvm@gmail.com
push dateFri, 18 Oct 2013 19:14:25 +0000
treeherdermozilla-central@3daff401c7ab [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjdm
bugs924397
milestone27.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 924397 - WebIDL parser doesn't specify file when encountering syntax error at end of file. r=jdm
dom/bindings/parser/WebIDL.py
--- a/dom/bindings/parser/WebIDL.py
+++ b/dom/bindings/parser/WebIDL.py
@@ -4775,17 +4775,18 @@ class Parser(Tokenizer):
     def p_ExtendedAttributeNamedArgList(self, p):
         """
             ExtendedAttributeNamedArgList : IDENTIFIER EQUALS IDENTIFIER LPAREN ArgumentList RPAREN
         """
         p[0] = (p[1], p[3], p[5])
 
     def p_error(self, p):
         if not p:
-            raise WebIDLError("Syntax Error at end of file. Possibly due to missing semicolon(;), braces(}) or both", [])
+            raise WebIDLError("Syntax Error at end of file. Possibly due to missing semicolon(;), braces(}) or both",
+                              [self._filename])
         else:
             raise WebIDLError("invalid syntax", [Location(self.lexer, p.lineno, p.lexpos, self._filename)])
 
     def __init__(self, outputdir='', lexer=None):
         Tokenizer.__init__(self, outputdir, lexer)
         self.parser = yacc.yacc(module=self,
                                 outputdir=outputdir,
                                 tabmodule='webidlyacc',