-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
…847)
- Loading branch information
1 parent
8a93ce8
commit 6b6f260
Showing
6 changed files
with
57 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@nomicfoundation/slang": patch | ||
--- | ||
|
||
prioritize parsing `MultiLineComment` over `MultiLineNatSpecComment` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 5 additions & 1 deletion
6
crates/solidity/outputs/cargo/slang_solidity/src/generated/language.rs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
5 changes: 5 additions & 0 deletions
5
crates/solidity/outputs/cargo/tests/src/cst_output/generated/SourceUnit.rs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
35 changes: 35 additions & 0 deletions
35
...snapshots/cst_output/SourceUnit/empty_multiline_over_natspec/generated/0.4.11-success.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# This file is generated automatically by infrastructure scripts. Please don't edit by hand. | ||
|
||
Source: > | ||
1 │ // The below comments should be parsed into two separate tokens, instead of one NatSpec comment: │ 0..96 | ||
2 │ │ 97..97 | ||
3 │ contract Foo { │ 98..112 | ||
4 │ /**/ │ 113..119 | ||
5 │ } │ 120..121 | ||
6 │ /**/ │ 122..126 | ||
Errors: [] | ||
|
||
Tree: | ||
- (SourceUnit): # "// The below comments should be parsed into two se..." (0..127) | ||
- (members꞉ SourceUnitMembers): # "// The below comments should be parsed into two se..." (0..122) | ||
- (item꞉ SourceUnitMember) ► (variant꞉ ContractDefinition): # "// The below comments should be parsed into two se..." (0..122) | ||
- (LeadingTrivia): # "// The below comments should be parsed into two se..." (0..98) | ||
- (SingleLineComment): "// The below comments should be parsed into two se..." # (0..96) | ||
- (EndOfLine): "\n" # (96..97) | ||
- (EndOfLine): "\n" # (97..98) | ||
- (contract_keyword꞉ ContractKeyword): "contract" # (98..106) | ||
- (LeadingTrivia) ► (Whitespace): " " # (106..107) | ||
- (name꞉ Identifier): "Foo" # (107..110) | ||
- (LeadingTrivia) ► (Whitespace): " " # (110..111) | ||
- (open_brace꞉ OpenBrace): "{" # (111..112) | ||
- (TrailingTrivia) ► (EndOfLine): "\n" # (112..113) | ||
- (LeadingTrivia): # " /**/\n" (113..120) | ||
- (Whitespace): " " # (113..115) | ||
- (MultiLineComment): "/**/" # (115..119) | ||
- (EndOfLine): "\n" # (119..120) | ||
- (close_brace꞉ CloseBrace): "}" # (120..121) | ||
- (TrailingTrivia) ► (EndOfLine): "\n" # (121..122) | ||
- (LeadingTrivia): # "/**/\n" (122..127) | ||
- (MultiLineComment): "/**/" # (122..126) | ||
- (EndOfLine): "\n" # (126..127) |
6 changes: 6 additions & 0 deletions
6
...s/solidity/testing/snapshots/cst_output/SourceUnit/empty_multiline_over_natspec/input.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// The below comments should be parsed into two separate tokens, instead of one NatSpec comment: | ||
|
||
contract Foo { | ||
/**/ | ||
} | ||
/**/ |