-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Closed
Labels
P: criticalShould be looked at before anything elseShould be looked at before anything elsebugSomething isn't workingSomething isn't workingcompiler: parserEverything to do with the parserEverything to do with the parserteam:compilerCompiler TeamCompiler Team
Description
lex_commented() does not pick up // This is a comment next to a const with the following example:
contract;
const /* TEST: blah blah tests */ TEST: u16 = 10; // This is a comment next to a constI believe this example is a valid sway program so while lexing we should include the last comment to the token stream.
I do suspect this happens not just after const but after the last semicolon in the source file (if there is no encapsulating braces etc). (Need to test this feeling and if that is the case I will update the title)
Realized while testing #2311
mitchmindtree
Metadata
Metadata
Assignees
Labels
P: criticalShould be looked at before anything elseShould be looked at before anything elsebugSomething isn't workingSomething isn't workingcompiler: parserEverything to do with the parserEverything to do with the parserteam:compilerCompiler TeamCompiler Team