From aa43d440dd3a39d7f371d05ecd1fe86f40c53b69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jesper=20=C3=96qvist?= <jesper.oqvist@cs.lth.se> Date: Mon, 6 Feb 2017 14:01:02 +0100 Subject: [PATCH] Parse annotations on aspect-declared constructors fixes #271 (bitbucket) --- ChangeLog | 1 + src/javacc/jrag/Jrag.jjt | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0cfa4cea..102ccef8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,7 @@ for each AST class. * NTAs declared in the abstract grammar will now always be cached, just like attribute-only NTAs. + * Allow user annotations on aspect constructor declarations. 2016-10-24 Jesper Öqvist <jesper.oqvist@cs.lth.se> diff --git a/src/javacc/jrag/Jrag.jjt b/src/javacc/jrag/Jrag.jjt index 78b86a25..edac6c73 100644 --- a/src/javacc/jrag/Jrag.jjt +++ b/src/javacc/jrag/Jrag.jjt @@ -654,7 +654,7 @@ void AspectBodyDeclaration() : LOOKAHEAD( AspectMethodDeclarationLookahead() ) AspectMethodDeclaration() | - LOOKAHEAD( [ "public" | "protected" | "private" ] <IDENTIFIER> "." <IDENTIFIER> "(" ) + LOOKAHEAD( Modifiers() <IDENTIFIER> "." <IDENTIFIER> "(" ) AspectConstructorDeclaration() | LOOKAHEAD( AspectFieldDeclarationLookahead() ) @@ -973,7 +973,7 @@ void AspectRefineMethodDeclaration() : void AspectConstructorDeclaration() : {Token t;} { - [ "public" | "protected" | "private" ] + Modifiers() t = <IDENTIFIER> "." { className = t.image; } <IDENTIFIER> FormalParameters() [ "throws" NameList() ] "{" [ LOOKAHEAD(ExplicitConstructorInvocation()) ExplicitConstructorInvocation() ] -- GitLab