8000 Allow custom @SuppressWarnings in JFlex 1.8.2 · Issue #762 · jflex-de/jflex · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Allow custom @SuppressWarnings in JFlex 1.8.2 #762
Closed
@tbl0605

Description

@tbl0605

Hi,
I'm from eclipse PDT team, and we recently switched from JFlex 1.6.1 to JFlex 1.8.2, it works great, thank you for your hard work, it's much appreciated!
We just noticed a minor issue (if we can call this an issue) while using our lexical specification files.
Long time ago, we've added our own "@SuppressWarnings" annotations, so our lexical files start with:

package org.eclipse.php.internal.core.ast.scanner.php;
import ...;

@SuppressWarnings({"unused", "nls"})

%%
...

that will now be generated as:

// DO NOT EDIT
// Generated by JFlex 1.8.2 http://jflex.de/
...
package org.eclipse.php.internal.core.ast.scanner.php;
...
@SuppressWarnings({"unused", "nls"})


// See https://github.com/jflex-de/jflex/issues/222
@SuppressWarnings("FallThrough")
public class PHPAstLexer ...

The fact that JFlex 1.8.2 adds its own '@SuppressWarnings("FallThrough")' annotation will now result in java compilation errors (Duplicate annotation of non-repeatable type @SuppressWarnings.).
For now we simply removed our "@SuppressWarnings" annotations to workaround the issue.

This brings me to following question:
would it be possible to add in future releases a new JFlex run option (for example --annotations) to add our own annotations again?

Thank you!

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0