diff options
author | Eduardo Julian | 2022-06-26 02:57:13 -0400 |
---|---|---|
committer | Eduardo Julian | 2022-06-26 02:57:13 -0400 |
commit | 716ca5377386ca87eded7dd514ccc17f8ed281c3 (patch) | |
tree | 30ecd03de0f32057d453ab2c342fd17f88732ae3 /stdlib/source/parser | |
parent | cfdc546e6834ceeb78cb692d17fd5c60695be982 (diff) |
De-sigil-ification: suffix : [Part 16]
Diffstat (limited to 'stdlib/source/parser')
-rw-r--r-- | stdlib/source/parser/lux/data/binary.lux | 20 | ||||
-rw-r--r-- | stdlib/source/parser/lux/data/format/json.lux | 12 | ||||
-rw-r--r-- | stdlib/source/parser/lux/data/format/xml.lux | 18 | ||||
-rw-r--r-- | stdlib/source/parser/lux/data/text.lux | 22 | ||||
-rw-r--r-- | stdlib/source/parser/lux/tool/compiler/language/lux/analysis.lux | 6 | ||||
-rw-r--r-- | stdlib/source/parser/lux/tool/compiler/language/lux/synthesis.lux | 14 |
6 files changed, 46 insertions, 46 deletions
diff --git a/stdlib/source/parser/lux/data/binary.lux b/stdlib/source/parser/lux/data/binary.lux index 3539323c5..1e1ac7704 100644 --- a/stdlib/source/parser/lux/data/binary.lux +++ b/stdlib/source/parser/lux/data/binary.lux @@ -9,7 +9,7 @@ [control ["//" parser (.use "[1]#[0]" monad)] ["[0]" try (.only Try)] - ["[0]" exception (.only exception:)]] + ["[0]" exception (.only exception)]] [data ["/" binary ["[1]" \\unsafe (.only Binary)]] @@ -37,8 +37,8 @@ (.type .public Parser (//.Parser [Offset Binary])) -(exception: .public (binary_was_not_fully_read [binary_length Nat - bytes_read Nat]) +(exception .public (binary_was_not_fully_read [binary_length Nat + bytes_read Nat]) (exception.report "Binary length" (%.nat binary_length) "Bytes read" (%.nat bytes_read))) @@ -88,9 +88,9 @@ (def .public size_32 Size (n.* 2 size_16)) (def .public size_64 Size (n.* 2 size_32)) -(exception: .public (range_out_of_bounds [length Nat - start Nat - end Nat]) +(exception .public (range_out_of_bounds [length Nat + start Nat + end Nat]) (exception.report "Length" (%.nat length) "Range start" (%.nat start) @@ -125,8 +125,8 @@ (Parser Frac) (//#each frac.of_bits ..bits_64)) -(exception: .public (invalid_tag [range Nat - byte Nat]) +(exception .public (invalid_tag [range Nat + byte Nat]) (exception.report "Tag range" (%.nat range) "Tag value" (%.nat byte))) @@ -159,7 +159,7 @@ (Parser Any) (//#in [])) -(exception: .public (not_a_bit [value Nat]) +(exception .public (not_a_bit [value Nat]) (exception.report "Expected values" "either 0 or 1" "Actual value" (%.nat value))) @@ -250,7 +250,7 @@ (|>> (//.and value) (..or ..any)))) -(exception: .public set_elements_are_not_unique) +(exception .public set_elements_are_not_unique) (def .public (set hash value) (All (_ a) (-> (Hash a) (Parser a) (Parser (Set a)))) diff --git a/stdlib/source/parser/lux/data/format/json.lux b/stdlib/source/parser/lux/data/format/json.lux index d579b9060..c78f8132c 100644 --- a/stdlib/source/parser/lux/data/format/json.lux +++ b/stdlib/source/parser/lux/data/format/json.lux @@ -6,7 +6,7 @@ [control ["//" parser (.use "[1]#[0]" functor)] ["[0]" try (.only Try)] - ["[0]" exception (.only exception:)]] + ["[0]" exception (.only exception)]] [data ["[0]" bit] ["[0]" text (.use "[1]#[0]" equivalence monoid)] @@ -25,11 +25,11 @@ (type .public (Parser a) (//.Parser (List JSON) a)) -(exception: .public (unconsumed_input [input (List JSON)]) +(exception .public (unconsumed_input [input (List JSON)]) (exception.report "Input" (exception.listing /.format input))) -(exception: .public empty_input) +(exception .public empty_input) (def .public (result parser json) (All (_ a) (-> (Parser a) JSON (Try a))) @@ -55,7 +55,7 @@ {.#Item head tail} {try.#Success [tail head]}))) -(exception: .public (unexpected_value [value JSON]) +(exception .public (unexpected_value [value JSON]) (exception.report "Value" (/.format value))) @@ -77,8 +77,8 @@ [string /.String /.#String] ) -(exception: .public [a] (value_mismatch [reference JSON - sample JSON]) +(exception .public [a] (value_mismatch [reference JSON + sample JSON]) (exception.report "Reference" (/.format reference) "Sample" (/.format sample))) diff --git a/stdlib/source/parser/lux/data/format/xml.lux b/stdlib/source/parser/lux/data/format/xml.lux index 44cfa8fdd..70376d2c6 100644 --- a/stdlib/source/parser/lux/data/format/xml.lux +++ b/stdlib/source/parser/lux/data/format/xml.lux @@ -6,7 +6,7 @@ [control ["//" parser] ["[0]" try (.only Try) (.use "[1]#[0]" functor)] - ["[0]" exception (.only exception:)]] + ["[0]" exception (.only exception)]] [data ["[0]" text ["%" \\format (.only format)]] @@ -21,22 +21,22 @@ (type .public (Parser a) (//.Parser [Attrs (List XML)] a)) -(exception: .public empty_input) -(exception: .public unexpected_input) +(exception .public empty_input) +(exception .public unexpected_input) -(exception: .public (wrong_tag [expected Tag - actual Tag]) +(exception .public (wrong_tag [expected Tag + actual Tag]) (exception.report "Expected" (%.text (/.tag expected)) "Actual" (%.text (/.tag actual)))) -(exception: .public (unknown_attribute [expected Attribute - available (List Attribute)]) +(exception .public (unknown_attribute [expected Attribute + available (List Attribute)]) (exception.report "Expected" (%.text (/.attribute expected)) "Available" (exception.listing (|>> /.attribute %.text) available))) -(exception: .public (unconsumed_inputs [inputs (List XML)]) +(exception .public (unconsumed_inputs [inputs (List XML)]) (exception.report "Inputs" (exception.listing (at /.codec encoded) inputs))) @@ -124,7 +124,7 @@ {.#Item head tail} {try.#Success [[attrs tail] head]}))) -(exception: .public nowhere) +(exception .public nowhere) (def .public (somewhere parser) (All (_ a) (-> (Parser a) (Parser a))) diff --git a/stdlib/source/parser/lux/data/text.lux b/stdlib/source/parser/lux/data/text.lux index 3cc4dd8da..3cd4076f5 100644 --- a/stdlib/source/parser/lux/data/text.lux +++ b/stdlib/source/parser/lux/data/text.lux @@ -7,7 +7,7 @@ ["//" parser] ["[0]" maybe] ["[0]" try (.only Try)] - ["[0]" exception (.only exception:)]] + ["[0]" exception (.only exception)]] [data ["/" text (.only Char) (.use "[1]#[0]" monoid)] ["[0]" product] @@ -28,8 +28,8 @@ Offset 0) -(exception: .public cannot_parse) -(exception: .public cannot_slice) +(exception .public cannot_parse) +(exception .public cannot_slice) (type .public Parser (//.Parser [Offset Text])) @@ -55,15 +55,15 @@ (-> Offset Text Text) (|> tape (/.clip_since offset) maybe.trusted)) -(exception: .public (unconsumed_input [offset Offset - tape Text]) +(exception .public (unconsumed_input [offset Offset + tape Text]) (exception.report "Offset" (n#encoded offset) "Input size" (n#encoded (/.size tape)) "Remaining input" (..left_over offset tape))) -(exception: .public (expected_to_fail [offset Offset - tape Text]) +(exception .public (expected_to_fail [offset Offset + tape Text]) (exception.report "Offset" (n#encoded offset) "Input" (..left_over offset tape))) @@ -133,7 +133,7 @@ [not! Slice ..any!] ) -(exception: .public (cannot_match [reference Text]) +(exception .public (cannot_match [reference Text]) (exception.report "Reference" (/.format reference))) @@ -229,8 +229,8 @@ (..range! (char "A") (char "F")))) (with_template [<name>] - [(exception: .public (<name> [options Text - character Char]) + [(exception .public (<name> [options Text + character Char]) (exception.report "Options" (/.format options) "Character" (/.format (/.of_char character))))] @@ -277,7 +277,7 @@ [none_of! .not ..character_should_not_be] ) -(exception: .public (character_does_not_satisfy_predicate [character Char]) +(exception .public (character_does_not_satisfy_predicate [character Char]) (exception.report "Character" (/.format (/.of_char character)))) diff --git a/stdlib/source/parser/lux/tool/compiler/language/lux/analysis.lux b/stdlib/source/parser/lux/tool/compiler/language/lux/analysis.lux index 99a2f3e8e..32ee998eb 100644 --- a/stdlib/source/parser/lux/tool/compiler/language/lux/analysis.lux +++ b/stdlib/source/parser/lux/tool/compiler/language/lux/analysis.lux @@ -6,7 +6,7 @@ [control ["//" parser] ["[0]" try (.only Try)] - ["[0]" exception (.only exception:)]] + ["[0]" exception (.only exception)]] [data ["[0]" bit] ["[0]" text (.only) @@ -38,11 +38,11 @@ (list#each /.format) (text.interposed " ")))) -(exception: .public (cannot_parse [input (List Analysis)]) +(exception .public (cannot_parse [input (List Analysis)]) (exception.report "Input" (exception.listing /.format input))) -(exception: .public (unconsumed_input [input (List Analysis)]) +(exception .public (unconsumed_input [input (List Analysis)]) (exception.report "Input" (exception.listing /.format input))) diff --git a/stdlib/source/parser/lux/tool/compiler/language/lux/synthesis.lux b/stdlib/source/parser/lux/tool/compiler/language/lux/synthesis.lux index c5f44f784..de0c5d1ac 100644 --- a/stdlib/source/parser/lux/tool/compiler/language/lux/synthesis.lux +++ b/stdlib/source/parser/lux/tool/compiler/language/lux/synthesis.lux @@ -6,7 +6,7 @@ [control ["//" parser] ["[0]" try (.only Try)] - ["[0]" exception (.only exception:)]] + ["[0]" exception (.only exception)]] [data ["[0]" bit] ["[0]" text (.only) @@ -31,25 +31,25 @@ [\\library ["[0]" / (.only Synthesis Abstraction)]]) -(exception: .public (cannot_parse [input (List Synthesis)]) +(exception .public (cannot_parse [input (List Synthesis)]) (exception.report "Input" (exception.listing /.%synthesis input))) -(exception: .public (unconsumed_input [input (List Synthesis)]) +(exception .public (unconsumed_input [input (List Synthesis)]) (exception.report "Input" (exception.listing /.%synthesis input))) -(exception: .public (expected_empty_input [input (List Synthesis)]) +(exception .public (expected_empty_input [input (List Synthesis)]) (exception.report "Input" (exception.listing /.%synthesis input))) -(exception: .public (wrong_arity [expected Arity - actual Arity]) +(exception .public (wrong_arity [expected Arity + actual Arity]) (exception.report "Expected" (%.nat expected) "Actual" (%.nat actual))) -(exception: .public empty_input) +(exception .public empty_input) (type .public Parser (//.Parser (List Synthesis))) |