Skip to content

~ character in the package name breaks generated code #47

@rnestertsov

Description

@rnestertsov

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions