Parser and type checker almost completely working

Added testing env
This commit is contained in:
macocianradu
2021-11-11 17:25:30 +01:00
parent 464ef29caa
commit 3890ed5f03
32 changed files with 287 additions and 356 deletions

View File

@@ -0,0 +1,6 @@
type Period: <"description">
periodMultiplier int (1..1) <"A time period multiplier, e.g. 1, 2 or 3 etc. A negative value can be used when specifying an offset relative to another date, e.g. -2 days.">
testMany TestType (0..*) <"Test many">
testSome TestSomeType (1..*) <"Test some">
testMaybeOne TestZeroOneType (0..1) <"Test zero or one">
testAll Test (2..15) <"Test all">

View File

@@ -0,0 +1,2 @@
type TestType:
periodMultiplier int (1..1)

View File

@@ -0,0 +1,2 @@
type TestSomeType: <"description">
periodMultiplier int (1..1) <"A time period multiplier, e.g. 1, 2 or 3 etc. A negative value can be used when specifying an offset relative to another date, e.g. -2 days.">

View File

@@ -0,0 +1,2 @@
type TestZeroOneType extends Period:
periodMultiplier int (1..1)

View File

@@ -0,0 +1,2 @@
type WrongCardinality: <"description">
periodMultiplier int (1.1) <"A time period multiplier, e.g. 1, 2 or 3 etc. A negative value can be used when specifying an offset relative to another date, e.g. -2 days.">

View File

@@ -0,0 +1,2 @@
type WrongCardinality2: <"description">
periodMultiplier int (1..a) <"A time period multiplier, e.g. 1, 2 or 3 etc. A negative value can be used when specifying an offset relative to another date, e.g. -2 days.">

View File

@@ -0,0 +1,2 @@
type MissingType: <"description">
periodMultiplier (1.1) <"A time period multiplier, e.g. 1, 2 or 3 etc. A negative value can be used when specifying an offset relative to another date, e.g. -2 days.">