-
Notifications
You must be signed in to change notification settings - Fork 0
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
Version 1.0.0 #29
Merged
Merged
Version 1.0.0 #29
Conversation
This file contains 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
Why: Just redoing it.
Add the structure on how the parser should work as a base layer.
When a failure or a skip parse result was initialized it was always newly created and didn't use a cache.
Change ifs to a switch. Remove an import.
The parser now returns a FluentResource instead of null.
Change the base FluentParser interface to a generic interface so that it can be used for for occurrences and more checks can be applied at compile time.
Skippers are parsers that just tell the system to skip the current characters so that things like whitespace (or similar) are not getting processed.
FluentEntries are the base blocks for fluent itself and with that they need to be parsed first.
Add the other entry parser: "FluentTermParser". Move the entry parsers to their own package: "entry"
The pattern parsing system is running through all of the available parsers and checks if they would work. If they would work they are checking if they would return a ParseError and if they don't a new element is added or the possible part is being skipped. After that the TextElements are being added by always tracking the amount of characters that have been checked and if a newline happens or a parser returns a valid response it is getting cut out and added to the list.
To declare the end of the body of an entry a special function can be used that is checking if the body itself should terminate.
The sanitizer itself is combining the textElements, removes the trailing whitespace and removes unnecessary elements from the strings.
When the file would have been ```ftl test = Hello, this is a test. ``` It would have returned: ```text Hello, this is a test ``` but the correct result is: ```text Hello, this is a test. ```
Add the fluent variable parser that parses the variable reference in a placeable to an instance of the FluentVariableReference class.
Even though lists are quite useful in Java, they shouldn't really be used for data that is static and won't change again.
As the project is now being compiled in Java 16 there is the record feature which allows for getter, equals, hashCode, toString, etc. generation which makes the code more clean and stable as there is less room for mistakes.
As the Locale class is the default class in the JDK it is a lot more sensible to use that class because it can be used in more scenarios.
As the toString method in Exceptions shouldn't really be overridden and the getLocalizedMessage is the correct method for provinding the reason of the Exception it is being changed.
Refactor/code structure
Enhance/content iterator
Change the README to work for the new version of fluent.
As the method wasn't being used and can easily be replicated with the existing API it can easily be removed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.