Skip to content

Commit 1894cb5

Browse files
alanzfacebook-github-bot
authored andcommitted
Add support for nominal types
Summary: Add support for nominal type aliases as per [EEP-69](https://github.com/erlang/eep/blob/master/eeps/eep-0069.md). Note: this updates the grammar only, matching ELP changes will follow Reviewed By: ilya-klyuchnikov Differential Revision: D72445312 fbshipit-source-id: 47aebda7e99c7bd2b3033642a01ed06cc9dbd633
1 parent 0438de8 commit 1894cb5

File tree

5 files changed

+34541
-34305
lines changed

5 files changed

+34541
-34305
lines changed

grammar.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,7 @@ module.exports = grammar({
237237
$.deprecated_attribute,
238238
$.record_decl,
239239
$.type_alias,
240+
$.nominal,
240241
$.opaque,
241242
$.spec,
242243
$.callback,
@@ -437,6 +438,8 @@ module.exports = grammar({
437438

438439
type_alias: $ => seq('-', atom_const('type'), $._type_def, '.'),
439440

441+
nominal: $ => seq('-', atom_const('nominal'), $._type_def, '.'),
442+
440443
opaque: $ => seq('-', atom_const('opaque'), $._type_def, '.'),
441444

442445
_type_def: $ => choice(

src/grammar.json

Lines changed: 39 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/node-types.json

Lines changed: 34 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)