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

~ character in the package name breaks generated code #47

Open
rnestertsov opened this issue Aug 2, 2021 · 0 comments
Open

~ character in the package name breaks generated code #47

rnestertsov opened this issue Aug 2, 2021 · 0 comments

Comments

@rnestertsov
Copy link

I've noticed strange behavior with the code generator for my grammar.

I have a "~" char in the package name I define inside my "tm" file and as result code produced by textmapper becomes invalid.

Example:
Package name inside tm file:

package = "git.sr.ht/~rn/lang"

Generated lexer.go (the problem exist in other files too):

import (
	"git.sr.ht/~rn/lang"
	"strings"
	"unicode/utf8"
)

// generated by Textmapper; DO NOT EDIT

package git.sr.ht/~rn/lang

Textmapper generate valid code once I remove "~" char from package name.

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

No branches or pull requests

1 participant