Skip to content

Commit

Permalink
Remove unused types, methods etc.
Browse files Browse the repository at this point in the history
  • Loading branch information
vipentti committed Dec 16, 2023
1 parent 7fee41d commit 5489276
Show file tree
Hide file tree
Showing 4 changed files with 1,171 additions and 1,367 deletions.
31 changes: 6 additions & 25 deletions src/Visp.Compiler/Parser.fsy
Original file line number Diff line number Diff line change
Expand Up @@ -613,25 +613,6 @@ quoted_expr:
| HASH_BRACE quoted_exprs RBRACE
{ SynQuoted.HashSet ($2, lhs parseState) }

value_exprs: rev_value_exprs { List.rev $1 }
rev_value_exprs:
| { [] }
| value_expr { [$1] }
| rev_value_exprs value_expr { $2 :: $1 }

value_expr:
| constant { SynValue.Const(fst $1, snd $1) }
| symbol { SynValue.Symbol($1) }
| keyword { SynValue.Keyword($1) }
| LPAREN value_exprs RPAREN
{ SynValue.List ($2, lhs parseState) }
| LBRACKET value_exprs RBRACKET
{ SynValue.Vector ($2, lhs parseState) }
| LBRACE value_exprs RBRACE
{ SynValue.HashMap ($2, lhs parseState) }
| HASH_BRACE value_exprs RBRACE
{ SynValue.HashSet ($2, lhs parseState) }

quasiquoted_exprs: rev_quasiquoted_exprs { List.rev $1 }
rev_quasiquoted_exprs:
| quasiquoted_expr { [$1] }
Expand Down Expand Up @@ -791,12 +772,12 @@ union_field:
record_expr:
| RECORD symbol record_labels_or_members
{
let labels, members = Syntax.partitionMembers $3
let members, labels = Syntax.partitionChoices $3
SynExpr.Record($2, labels, members, [] , lhs parseState)
}
| attribute_list RECORD symbol record_labels_or_members
{
let labels, members = Syntax.partitionMembers $4
let members, labels = Syntax.partitionChoices $4
SynExpr.Record($3, labels, members, $1 , lhs parseState)
}

Expand All @@ -811,13 +792,13 @@ record_label_or_member_parens:

record_label_or_member:
| MEMBER symbol expr
{ RecordContent.Member(SynTypeMember.Member($2, $3, lhs parseState)) }
{ Choice1Of2(SynTypeMember.Member($2, $3, lhs parseState)) }
| MEMBER FN symbol arg_list_start expr_list
{ RecordContent.Member(SynTypeMember.MemberFn($3, $4, $5, (lhs parseState))) }
{ Choice1Of2(SynTypeMember.MemberFn($3, $4, $5, (lhs parseState))) }
| symbol COLON syntype_ident
{ RecordContent.Label (RecordLabel(RecordLabelKind.Default, $1, $3, lhs parseState)) }
{ Choice2Of2 (RecordLabel(RecordLabelKind.Default, $1, $3, lhs parseState)) }
| MUT symbol COLON syntype_ident
{ RecordContent.Label (RecordLabel(RecordLabelKind.Mutable, $2, $4, lhs parseState)) }
{ Choice2Of2 (RecordLabel(RecordLabelKind.Mutable, $2, $4, lhs parseState)) }

typed_list: rev_typed_list { List.rev $1 }
rev_typed_list:
Expand Down
Loading

0 comments on commit 5489276

Please sign in to comment.