Skip to content

Commit

Permalink
Merge pull request #240 from ichiban/add-letter-modifier-to-small-let…
Browse files Browse the repository at this point in the history
…ter-char

add Lm (Letter, modifier) to small letter char
  • Loading branch information
ichiban authored Aug 6, 2022
2 parents 8bbdd2c + 7ffc3d8 commit 596218f
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 596218f

Please sign in to comment.