- Revision
- 590
- Author
- rfscholte
- Date
- 2009-04-16 13:34:21 -0500 (Thu, 16 Apr 2009)
Log Message
fix for QDOX-159
Modified Paths
Diff
Modified: trunk/qdox/src/grammar/lexer.flex (589 => 590)
--- trunk/qdox/src/grammar/lexer.flex 2009-03-26 21:17:13 UTC (rev 589) +++ trunk/qdox/src/grammar/lexer.flex 2009-04-16 18:34:21 UTC (rev 590) @@ -203,6 +203,9 @@ return Parser.IDENTIFIER; } + {Eol} { + annotation = false; + } } <YYINITIAL> { ";" { return Parser.SEMI; }
Modified: trunk/qdox/src/test/com/thoughtworks/qdox/parser/LexerTest.java (589 => 590)
--- trunk/qdox/src/test/com/thoughtworks/qdox/parser/LexerTest.java 2009-03-26 21:17:13 UTC (rev 589) +++ trunk/qdox/src/test/com/thoughtworks/qdox/parser/LexerTest.java 2009-04-16 18:34:21 UTC (rev 590) @@ -690,4 +690,19 @@ assertLex(Parser.PARENCLOSE, lexer); } + public void testSimpleAnnotation() throws Exception { + String in = "@Override\n public boolean isReadOnly(final ELContext context)"; + Lexer lexer = new JFlexLexer(new StringReader(in)); + assertLex(Parser.AT, lexer); + assertLex(Parser.IDENTIFIER, lexer); + assertLex(Parser.PUBLIC, lexer); + assertLex(Parser.IDENTIFIER, lexer); + assertLex(Parser.IDENTIFIER, lexer); + assertLex(Parser.PARENOPEN, lexer); + assertLex(Parser.FINAL, lexer); + assertLex(Parser.IDENTIFIER, lexer); + assertLex(Parser.IDENTIFIER, lexer); + assertLex(Parser.PARENCLOSE, lexer); + + } }
To unsubscribe from this list please visit:
