Skip to content

Commit

Permalink
add Lm (Letter, modifier) to small letter char
Browse files Browse the repository at this point in the history
  • Loading branch information
ichiban committed Aug 1, 2022
1 parent 8bbdd2c commit 7ffc3d8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion engine/lexer.go
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,7 @@ func isLetterChar(r rune) bool {
}

func isSmallLetterChar(r rune) bool {
return unicode.In(r, unicode.Ll, unicode.Lo)
return unicode.In(r, unicode.Ll, unicode.Lo, unicode.Lm)
}

func isCapitalLetterChar(r rune) bool {
Expand Down
1 change: 1 addition & 0 deletions engine/lexer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ func TestLexer_Token(t *testing.T) {
{input: `프롤로그`, token: Token{Kind: TokenLetterDigit, Val: `프롤로그`}},
{input: `برولوغ`, token: Token{Kind: TokenLetterDigit, Val: `برولوغ`}},
{input: `פרולוג`, token: Token{Kind: TokenLetterDigit, Val: `פרולוג`}},
{input: `ゴー`, token: Token{Kind: TokenLetterDigit, Val: `ゴー`}},

{input: `..`, token: Token{Kind: TokenGraphic, Val: `..`}},
{input: `#`, token: Token{Kind: TokenGraphic, Val: `#`}},
Expand Down

0 comments on commit 7ffc3d8

Please sign in to comment.