Conversation
Closing #2.
Caching dependencies; Trying to generate sources.
Adding github's token. Will it help?
…ying to make it compile first.
…en execute it.
Removing the debug log, in which I drown...
#2 - reverting, since I could find yet a way with maven(😡) to compile only LoopOverLanguageDefinitions.java and direct dependencies, to generate sources before full compilation.
|
I forgot to remove something that was supposed to be useful for me, but will not do good to your project (git acrions workflow that keeps failing). |
|
Taking it back: it passes. Reopening. |
| value("f"); | ||
| value(8); | ||
| value(true); | ||
| array(); //TODO: how come this is legal? |
There was a problem hiding this comment.
array() is a legal prefix of your grammar. To terminate a fluent program (and generate AST) you should call $() as well. Notice array().$() should not compile.
You can read on AST generation in the paper.
| or(value.with(Number.class)). | ||
| or(value.with(Boolean.class)). | ||
| or(_null_). | ||
| derive(Field).to(key.with(String.class), isSetTo, Element). |
There was a problem hiding this comment.
If you want, you can try instead isSetTo.with(Element). Fling does support nested APIs. (I.e., API as API function argument.)
Notice inner API calls should not end with a call to $().
| // @formatter:off | ||
| public class Json { | ||
| public static void main(String[] args) { | ||
| value("f"); |
There was a problem hiding this comment.
If you want, you can practice AST traversal by, say, pretty-printing the JSON objects. You can check the other use-cases for examples.
No description provided.