diff options
author | Eduardo Julian | 2020-12-17 22:03:54 -0400 |
---|---|---|
committer | Eduardo Julian | 2020-12-17 22:03:54 -0400 |
commit | 68b1dd82f23d6648ac3d9075a8f84b0174392945 (patch) | |
tree | 2db148a005c21552947d96dfd4e788ba21705037 /stdlib/source/program/aedifex/metadata/artifact.lux | |
parent | abc5c5293603229b447b8b5dfa7f3275571ad982 (diff) |
More optimizations to the Lux syntax parser.
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/program/aedifex/metadata/artifact.lux | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/stdlib/source/program/aedifex/metadata/artifact.lux b/stdlib/source/program/aedifex/metadata/artifact.lux index 1f8068111..aa7b9abce 100644 --- a/stdlib/source/program/aedifex/metadata/artifact.lux +++ b/stdlib/source/program/aedifex/metadata/artifact.lux @@ -61,6 +61,7 @@ [<group> "groupId"] [<name> "artifactId"] [<version> "version"] + [<versioning> "versioning"] [<versions> "versions"] [<last-updated> "lastUpdated"] [<metadata> "metadata"] @@ -87,8 +88,10 @@ xml.attributes (list (..write-group (get@ #group value)) (..write-name (get@ #name value)) - (..write-versions (get@ #versions value)) - (..write-last-updated (get@ #last-updated value))))) + (#xml.Node ..<versioning> + xml.attributes + (list (..write-versions (get@ #versions value)) + (..write-last-updated (get@ #last-updated value))))))) (def: (sub tag parser) (All [a] (-> xml.Tag (Parser a) (Parser a))) @@ -136,9 +139,13 @@ ($_ <>.and (<xml>.somewhere (..text ..<group>)) (<xml>.somewhere (..text ..<name>)) - (<xml>.somewhere (<| (..sub ..<versions>) - (<>.many (..text ..<version>)))) - (<xml>.somewhere ..last-updated-parser) + (<| (..sub ..<versioning>) + ($_ <>.and + (<| <xml>.somewhere + (..sub ..<versions>) + (<>.many (..text ..<version>))) + (<xml>.somewhere ..last-updated-parser) + )) ))) (def: #export equivalence |