Skip to content

Commit

Permalink
Add TODO notes for after the migration
Browse files Browse the repository at this point in the history
  • Loading branch information
Xanewok committed Nov 15, 2023
1 parent 5f0cccb commit f78143e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions crates/codegen/language/definition/src/model/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ mod wrapper {
#[derive(Clone, Debug, Eq, PartialEq, Serialize)]
pub struct PrecedenceExpression {
pub name: Identifier,
// TODO(#638): Remove this, once we adapt the DSL v1 codegen model to the new v2 definition.
pub rule_name: Identifier,

pub operators: Vec<PrecedenceOperator>,
Expand Down
4 changes: 2 additions & 2 deletions crates/solidity/inputs/language/src/definition.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ pub use solidity::SolidityDefinition;
codegen_language_macros::compile!(Language(
name = Solidity,
root_item = SourceUnit,
// NOTE: For now this is on par with the DSL v1 definition to minimize the fallout.
// At the final stage, we should use the correct trivia definition from https://github.com/NomicFoundation/slang/pull/629
// TODO(#638): For now this is on par with the DSL v1 definition to minimize the fallout.
// We should replace this with the new definition from #629.
leading_trivia = OneOrMore(Choice([
Trivia(Whitespace),
Trivia(EndOfLine),
Expand Down
4 changes: 2 additions & 2 deletions crates/solidity/inputs/language/src/grammar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ impl GrammarConstructorDslV2 for Grammar {
resolve_grammar_element(item.name(), &mut ctx);
}

// HACK: To make sure the unused (not referred to) keywords are included in the scanner literal trie,
// TODO(#638): To make sure the unused (not referred to) keywords are included in the scanner literal trie,
// we replicate the DSL v1 behaviour of introducing a synthetic parser that is only meant to group
// keywords by their lexical context.
let mut keywords_per_ctxt = HashMap::new();
Expand Down Expand Up @@ -227,7 +227,7 @@ impl ParserDefinition for NamedParserThunk {
}

fn is_inline(&self) -> bool {
// HACK: Make sure all keywords are referred to by a parser, so that codegen includes them in the trie.
// HACK(#638): Make sure all keywords are referred to by a parser, so that codegen includes them in the trie.
if self.name().ends_with("AllKeywords") {
return false;
}
Expand Down

0 comments on commit f78143e

Please sign in to comment.