Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Templates don't accept @@ anymore #22299

Closed
ratkingsminion opened this issue Sep 24, 2024 · 0 comments · Fixed by #22303
Closed

Templates don't accept @@ anymore #22299

ratkingsminion opened this issue Sep 24, 2024 · 0 comments · Fixed by #22303
Assignees
Labels
Bug This tag is applied to issues which reports bugs. Status: Confirmed This bug has been confirmed to be valid by a contributor. Unit: Parser Bugs/feature requests, that are related to the V parser or syntax (*not* semantic ones).

Comments

@ratkingsminion
Copy link

ratkingsminion commented Sep 24, 2024

V doctor:

V full version: V 0.4.7 8a0fc25.4ee948f
OS: linux, Linux Mint 21.3
Processor: 8 cpus, 64bit, little endian, Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz

getwd: /home/friedrich/Dev/Tests/v_tmpl_test
vexe: /home/friedrich/Tools/v/v
vexe mtime: 2024-09-24 18:46:16

vroot: OK, value: /home/friedrich/Tools/v
VMODULES: OK, value: /home/friedrich/.vmodules
VTMP: OK, value: /tmp/v_1000

Git version: git version 2.34.1
Git vroot status: weekly.2024.39-5-g4ee948fe
.git/config present: true

CC version: cc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
thirdparty/tcc status: thirdparty-linux-amd64 a0799a5b

What did you do?
./v -g -o vdbg cmd/v && ./vdbg tmpl_tst.v

module main

fn main() {
	$tmpl("tmpl.txt")
}

tmpl.txt:

Hello @@world!

What did you expect to see?

Nothing, it should just compile, because @@ should escape an @.

What did you see instead?

tmpl.txt:9:40: error: undefined ident: `world` (veb action: main__main)
tmpl.txt:9:40: error: expression does not return a value (veb action: main__main)

Instead, the @@ is ignored.

Note

You can use the 👍 reaction to increase the issue's priority for developers.

Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.

@felipensp felipensp self-assigned this Sep 24, 2024
@felipensp felipensp added the Bug This tag is applied to issues which reports bugs. label Sep 24, 2024
@felipensp felipensp added Status: Confirmed This bug has been confirmed to be valid by a contributor. Unit: Parser Bugs/feature requests, that are related to the V parser or syntax (*not* semantic ones). labels Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This tag is applied to issues which reports bugs. Status: Confirmed This bug has been confirmed to be valid by a contributor. Unit: Parser Bugs/feature requests, that are related to the V parser or syntax (*not* semantic ones).
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants