Fix pattern defs for pascaligo
This commit is contained in:
parent
f554551f75
commit
5533b07270
@ -733,7 +733,7 @@ module.exports = grammar({
|
||||
|
||||
_core_pattern: $ =>
|
||||
choice(
|
||||
$.Name,
|
||||
$.var_pattern,
|
||||
'_',
|
||||
$.Int,
|
||||
$.Nat,
|
||||
@ -743,6 +743,8 @@ module.exports = grammar({
|
||||
$._constr_pattern,
|
||||
),
|
||||
|
||||
var_pattern: $ => field("name", $.Name),
|
||||
|
||||
_list_pattern: $ =>
|
||||
choice(
|
||||
$.list_pattern,
|
||||
|
@ -115,6 +115,7 @@ recognise = descent (error "Reasonligo.recognise") $ map usingScope
|
||||
"nil" -> return $ IsList []
|
||||
"list_pattern" -> IsList <$> fields "element"
|
||||
"cons_pattern" -> IsCons <$> field "head" <*> field "tail"
|
||||
"var_pattern" -> IsVar <$> field "name"
|
||||
_ -> fallthrough
|
||||
|
||||
-- Alt
|
||||
|
Loading…
Reference in New Issue
Block a user