Bug 1317180, part 2 - Remove really old ~ syntax error for MessageId in IPDL parser. r=billm

MessageId has the production "'~' ID", but if you use it, it produces
an error. This error was added in 2009, in bug 525342. I doubt anybody
expects it to work any more, so it should just be a regular parse
error. This is the only usage of the literal ~ so it can now be
removed from there.

MozReview-Commit-ID: AivlLE8Nubv

--HG--
extra : rebase_source : 66f76d1528f0bcf624af97b9437834874e537eb8
This commit is contained in:
Andrew McCreight 2016-11-13 09:48:07 -08:00
Родитель 922c8bc81d
Коммит 6af7792084
1 изменённых файлов: 3 добавлений и 6 удалений

Просмотреть файл

@ -158,7 +158,7 @@ tokens = [
t_COLONCOLON = '::'
literals = '(){}[]<>;:,~'
literals = '(){}[]<>;:,'
t_ignore = ' \f\t\v'
def t_linecomment(t):
@ -525,12 +525,9 @@ def p_MessageBody(p):
def p_MessageId(p):
"""MessageId : ID
| __DELETE__
| DELETE
| '~' ID"""
| DELETE"""
loc = locFromTok(p, 1)
if 3 == len(p):
_error(loc, "sorry, `%s()' destructor syntax is a relic from a bygone era. Declare `__delete__()' in the `%s' protocol instead", p[1]+p[2], p[2])
elif 'delete' == p[1]:
if 'delete' == p[1]:
_error(loc, "`delete' is a reserved identifier")
p[0] = [ loc, p[1] ]