mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-25 12:32:50 -06:00
implemented pattern macros
This commit is contained in:
@@ -3,4 +3,12 @@ resource param_table = {
|
||||
param Q = Q1 | Q2 ;
|
||||
param P = P1 | P2 Q ;
|
||||
|
||||
oper ab_patt = #["ab"];
|
||||
|
||||
oper test : Str -> Q = \s ->
|
||||
case s of {
|
||||
#ab_patt + _ => Q1 ;
|
||||
_ => Q2
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user