-
Notifications
You must be signed in to change notification settings - Fork 80
Implement Syntax 0.8, part 1 (items 1-5) #307
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
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
d009ea2
Support astral Unicode characters in TextElements and StringLiterals
stasm 5941f1b
Don't store the term sigil in the identifier name
stasm bf3f6c8
Treat backslash as normal char in TextElements
stasm 1758b95
End comment lines on EOLs recognized by JS RegExp
stasm eb0493b
Forbid the closing brace in text
stasm File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,3 @@ | ||
| test/fixtures_reference/crlf.ftl eol=crlf | ||
| test/fixtures_reference/cr.ftl eol=cr | ||
| test/fixtures_structure/crlf.ftl eol=crlf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,16 @@ | ||
| # ~ERROR E0025, pos 8, args "A" | ||
| key1 = \A | ||
| ## Backslash is a regular character in text elements. | ||
| key01 = \A | ||
| key02 = \u0041 | ||
| key03 = \\u0041 | ||
| key04 = \u000z | ||
| key05 = \{Value} | ||
|
|
||
| # ~ERROR E0026, pos 23, args "000z" | ||
| key2 = \u000z | ||
| key06 = {"Escaped \" quote"} | ||
| key07 = {"Escaped \\ backslash"} | ||
| key08 = {"Escaped \u0041 A"} | ||
|
|
||
| key3 = \{Escaped} | ||
| key4 = {"Escaped \" quote"} | ||
| key5 = \u0041 | ||
| key6 = \\u0041 | ||
| # ~ERROR E0025, pos 232, args "A" | ||
| key09 = {"\A"} | ||
|
|
||
| # ~ERROR E0026, pos 252, args "000z" | ||
| key10 = {"\u000z"} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| face-with-tears-of-joy = 😂 | ||
| tetragram-for-centre = 𝌆 | ||
|
|
||
| surrogates-in-text = \uD83D\uDE02 | ||
| surrogates-in-string = {"\uD83D\uDE02"} | ||
| surrogates-in-adjacent-strings = {"\uD83D"}{"\uDE02"} | ||
|
|
||
| emoji-in-text = A face 😂 with tears of joy. | ||
| emoji-in-string = {"A face 😂 with tears of joy."} | ||
|
|
||
| # ERROR Invalid identifier | ||
| err-😂 = Value | ||
|
|
||
| # ERROR Invalid expression | ||
| err-invalid-expression = { 😂 } | ||
|
|
||
| # ERROR Invalid variant key | ||
| err-invalid-variant-key = { $sel -> | ||
| *[😂] Value | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just reviewed the opposite of this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is only for part 1 of #303. The change you're talking about, projectfluent/fluent#219, will be implemented later on. I chose this approach to minimize the amount of work related to porting reference tests to
fluent.js.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In other words,
const COMMENT_EOL = ["\n", "\r", "\u2028", "\u2029"];corresponds to the Fluent Syntax spec as of projectfluent/fluent@bf46e18. I'll remove it before all of Syntax 0.8 is implemented.