Is there an updated Motoko Grammar doc with all of the latest features?
- Multi-line strings
- Non-consensus async* / await*
- Optional else block for variable bindings
- Piping operator |>
- Collapsed switch branches
- Composite queries
Is there an updated Motoko Grammar doc with all of the latest features?
This is the source file for that doc, and is up to date (by virtue of being in the Motoko compiler repo, and being generated from it mechanically):
https://github.com/dfinity/motoko/blob/master/doc/md/examples/grammar.txt
(I’m not sure about the cadence for pushing those changes into the published docs. Maybe @claudio or @Jessie knows?)
Thank you @matthewhammer. Much appreciated!
From my understanding, the submodule for Motoko in the Portal repo needs to be updated to the latest commit hash. It looks like the latest version is from May: https://github.com/dfinity/portal/tree/master/submodules
We tend to keep the portal documentation in sync with the version of motoko shipped with the latest official dfx release.
https://internetcomputer.org/docs/current/motoko/version should state the version that the doc corresponds to.