Skip to content

Commit

Permalink
keep metadata entry last element as its value
Browse files Browse the repository at this point in the history
  • Loading branch information
carocad committed Aug 17, 2020
1 parent 8c79590 commit 6695fc5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Clojure.g4
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ reader_macro: ( unquote
| deref
);

metadata: (metadata_entry | deprecated_metadata_entry)+
metadata: ((metadata_entry | deprecated_metadata_entry) ignore*)+
( symbol
| collection
| set
Expand All @@ -74,7 +74,7 @@ metadata: (metadata_entry | deprecated_metadata_entry)+
| unquote_splicing
);

metadata_entry: '^' ignore* ( map | symbol | string | keyword | macro_keyword ) ignore*;
metadata_entry: '^' ignore* ( map | symbol | string | keyword | macro_keyword );

/**
* According to https://github.com/clojure/clojure-site/blob/7493bdb10222719923519bfd6d2699a26677ee82/content/guides/weird_characters.adoc#-and----metadata
Expand All @@ -83,7 +83,7 @@ metadata_entry: '^' ignore* ( map | symbol | string | keyword | macro_keyword )
* In order to support roundtrip of parser rules it is required to exactly identify the
* character used which would not be possible with something like '#'? '^'
*/
deprecated_metadata_entry: '#^' ignore* ( map | symbol | string | keyword | macro_keyword ) ignore*;
deprecated_metadata_entry: '#^' ignore* ( map | symbol | string | keyword | macro_keyword );

backtick: '`' ignore* form;

Expand Down

0 comments on commit 6695fc5

Please sign in to comment.