File tree Expand file tree Collapse file tree 4 files changed +10
-6
lines changed
Expand file tree Collapse file tree 4 files changed +10
-6
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " tiye/cirru-parser" ,
3- "version" : " 0.2.0 " ,
3+ "version" : " 0.2.1 " ,
44 "deps" : {},
55 "readme" : " README.md" ,
66 "repository" : " https://github.com/Cirru/parser.mbt" ,
Original file line number Diff line number Diff line change @@ -17,9 +17,10 @@ pub fn main_parser() -> Unit {
1717 match tree {
1818 Ok (tree ) => {
1919 println (tree .to_json ().stringify ())
20- match (try ? @json .parse (json_file )) {
21- Ok (json ) => println (json .stringify ())
22- Err (err ) => println (err .to_string ())
20+ try @json .parse (json_file ) catch {
21+ err => println (err .to_string ())
22+ } noraise {
23+ json => println (json .stringify ())
2324 }
2425 // println(tree)
2526 }
Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ suberror CirruParseError String
7373
7474///|
7575/// display Cirru parse error
76- pub fn to_string (self : CirruParseError ) -> String {
76+ pub fn CirruParseError :: to_string (self : Self ) -> String {
7777 match self {
7878 CirruParseError (s ) => s
7979 }
Original file line number Diff line number Diff line change @@ -13,7 +13,10 @@ pub fn format_to_lisp(xs : Array[Cirru]) -> String raise FormatError {
1313
1414///|
1515/// format single expression to Lisp-like code
16- fn format_lispy_expr (self : Cirru , indent : Int ) -> String raise FormatError {
16+ fn Cirru ::format_lispy_expr (
17+ self : Self ,
18+ indent : Int ,
19+ ) -> String raise FormatError {
1720 let empty_space = " "
1821 match self {
1922 List (xs ) =>
You can’t perform that action at this time.
0 commit comments