Change bargull-20110330-C9A by bargull@Bargull02 on 2011-03-30 18:26:50
in /home/anba/src/svn/openlaszlo/trunk
for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: Adjust parser to accept "*=" as untyped type with initializer

Bugs Fixed: LPP-9612 (Lexer needs to learn that `arg:*=default` is not `*=` operator)

Technical Reviewer: ptw
QA Reviewer: (pending)

Details:
There are basically two ways to fix this bug:
- either remove "*=" as a single token
- or special case "*=" in TypeAndInitializer() and FormalParameter()

The first approach requires some quirks in the lexer, because we still like to create token constants for "*=" and at the same time "*=" should no longer be parsed as a single token but as "*" and "=". Additionally AssignmentOperator() needs to special case "*" "=" to create the "*=" operator, so this requires even more hacks... Therefore I've taken the second approach, that means to handle "*=" in TypeAndInitializer() and FormalParameter(), so the parser creates the same ast as for "*" "=".


Tests:
test case from bug report

Files:
M WEB-INF/lps/server/sc/src/org/openlaszlo/sc/Parser.jjt

Changeset: http://svn.openlaszlo.org/openlaszlo/patches/bargull-20110330-C9A.tar

Reply via email to