Implement loading namespaces with the using keyword #829

Merged
ghallak merged 23 commits from ghallak/233 into master 2021-09-07 23:45:28 +09:00
2 changed files with 4 additions and 4 deletions
Showing only changes of commit 2d450397f4 - Show all commits

View File

@ -137,12 +137,12 @@ fundef_or_decl() ->
fundef()]).
using() ->
?RULE(keyword(using), con(), optional({keyword(as), id()}), using(get_ann(_1), _2, _3)).
?RULE(keyword(using), con(), optional({keyword(as), con()}), using(get_ann(_1), _2, _3)).
using(Ann, Con, none) ->
{using, Ann, Con};
using(Ann, Con, {ok, {_, Id}}) ->
{using, Ann, Con, Id}.
using(Ann, Con, {ok, {_, Alias}}) ->
{using, Ann, Con, Alias}.
pragma() ->
Op = choice([token(T) || T <- ['<', '=<', '==', '>=', '>']]),

View File

@ -54,7 +54,7 @@
-type pragma() :: {compiler, '==' | '<' | '>' | '=<' | '>=', compiler_version()}.
-type using() :: {using, ann(), con()}
| {using, ann(), con(), id()}.
| {using, ann(), con(), con()}.
-type letval() :: {letval, ann(), pat(), expr()}.
-type letfun() :: {letfun, ann(), id(), [pat()], type(), expr()}.