Skip to content

Conversation

@NTTVy03
Copy link
Collaborator

@NTTVy03 NTTVy03 commented Jan 6, 2025

  1. add missing signal assign token
  2. fix the grammar of the statement
  3. add statements test
  4. fix declaration, support matrix
  5. refactor declaration
  6. use list identity parser in the tuple

if let Some(token) = lookup_token_at_postion(&file, &program_ast, file.position(tmp)) {
println!(
"{:#?}",
lookup_node_wrap_token(TokenKind::TemplateDef, &token)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can apply Insta here to snapshot output and use it for test later.

let url = Url::from_file_path(Path::new("/hello/abc.tx"));
let binding = url.unwrap();
let p = binding.path();
println!("{:?}", Path::new(p).parent());
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add assert! here

| | | | SignalKw 174..180
| | | | | SignalKw 174..180 "signal"
| | | | WhiteSpace 180..181
| Error 1..2
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we have the error here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because you separate the test code into other file, the format is changed ('\r' character is added before '\n'). You can read more about '\r' here

I have fixed that.

Comment on lines 39 to 48
| | | Identifier 56..58
| | | | Identifier 56..58 "in"
| | | LBracket 58..59
| | | | LBracket 58..59 "["
| | | Expression 59..60
| | | | Identifier 59..60
| | | | | Identifier 59..60
| | | | | | Identifier 59..60 "N"
| | | RBracket 60..61
| | | | RBracket 60..61 "]"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Group this to one node.

| BlockComment 2..25
| | BlockComment 2..25
| | | BlockComment 2..25 "/*\r\ncomment\r\nblocks\r\n*/"
| Error 25..26
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Block comments have errors!

@vuvoth
Copy link
Owner

vuvoth commented Feb 6, 2025

We want to fix something. Let's merge this PR and create other PRs to solve this better.

@vuvoth vuvoth merged commit ff69d94 into master Feb 6, 2025
1 check passed
NTTVy03 added a commit that referenced this pull request Feb 6, 2025
@NTTVy03 NTTVy03 deleted the signal-inline-init branch May 18, 2025 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants