mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-09 04:59:31 -06:00
added test grammar for literals in the testsuite
This commit is contained in:
8
testsuite/runtime/parser/Literals.gf
Normal file
8
testsuite/runtime/parser/Literals.gf
Normal file
@@ -0,0 +1,8 @@
|
||||
abstract Literals = {
|
||||
cat S ;
|
||||
|
||||
fun IsString : String -> S ;
|
||||
IsInteger : Int -> S ;
|
||||
IsFloat : Float -> S ;
|
||||
|
||||
}
|
||||
9
testsuite/runtime/parser/LiteralsCnc.gf
Normal file
9
testsuite/runtime/parser/LiteralsCnc.gf
Normal file
@@ -0,0 +1,9 @@
|
||||
concrete LiteralsCnc of Literals = {
|
||||
|
||||
lincat S = Str ;
|
||||
|
||||
lin IsString x = x.s ++ "is string" ;
|
||||
lin IsInteger x = x.s ++ "is integer" ;
|
||||
lin IsFloat x = x.s ++ "is float" ;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user