mirror of
https://github.com/macocianradu/RosettaHaskellCompiler.git
synced 2026-03-18 21:10:07 +00:00
Parser and type checker almost completely working
Added testing env
This commit is contained in:
4
resources/Enums/testEnum1.rosetta
Executable file
4
resources/Enums/testEnum1.rosetta
Executable file
@@ -0,0 +1,4 @@
|
||||
enum PeriodEnum: <"The enumerated values to specified the period, e.g. day, week.">
|
||||
D displayName "day" <"Day">
|
||||
M displayName "month" <"Month">
|
||||
Y displayName "year" <"Year">
|
||||
4
resources/Enums/testEnum2.rosetta
Executable file
4
resources/Enums/testEnum2.rosetta
Executable file
@@ -0,0 +1,4 @@
|
||||
enum EnumWithoutDisplay: <"The enumerated values to specified the period, e.g. day, week.">
|
||||
D <"Day">
|
||||
M <"Month">
|
||||
Y <"Year">
|
||||
3
resources/Enums/testEnum3.rosetta
Executable file
3
resources/Enums/testEnum3.rosetta
Executable file
@@ -0,0 +1,3 @@
|
||||
enum EnumWithoutDescription:
|
||||
X displayName "xs"
|
||||
Y displayName "ys"
|
||||
3
resources/Enums/testEnum4.rosetta
Executable file
3
resources/Enums/testEnum4.rosetta
Executable file
@@ -0,0 +1,3 @@
|
||||
enum Wrong:
|
||||
A <"asd"> displayName "dsa"
|
||||
B <"xyz"> displayName "zyx"
|
||||
3
resources/Enums/testEnum5.rosetta
Executable file
3
resources/Enums/testEnum5.rosetta
Executable file
@@ -0,0 +1,3 @@
|
||||
enum Wrong2
|
||||
A <"asd"> displayName "dsa"
|
||||
B <"xyz"> displayName "zyx"
|
||||
3
resources/Enums/testEnum6.rosetta
Executable file
3
resources/Enums/testEnum6.rosetta
Executable file
@@ -0,0 +1,3 @@
|
||||
enum Wrong3::
|
||||
A <"asd"> displayName "dsa"
|
||||
B <"xyz"> displayName "zyx"
|
||||
6
resources/Types/testType1.rosetta
Normal file
6
resources/Types/testType1.rosetta
Normal 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">
|
||||
2
resources/Types/testType2.rosetta
Normal file
2
resources/Types/testType2.rosetta
Normal file
@@ -0,0 +1,2 @@
|
||||
type TestType:
|
||||
periodMultiplier int (1..1)
|
||||
2
resources/Types/testType3.rosetta
Normal file
2
resources/Types/testType3.rosetta
Normal 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.">
|
||||
2
resources/Types/testType4.rosetta
Normal file
2
resources/Types/testType4.rosetta
Normal file
@@ -0,0 +1,2 @@
|
||||
type TestZeroOneType extends Period:
|
||||
periodMultiplier int (1..1)
|
||||
2
resources/Types/testType5.rosetta
Normal file
2
resources/Types/testType5.rosetta
Normal 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.">
|
||||
2
resources/Types/testType6.rosetta
Normal file
2
resources/Types/testType6.rosetta
Normal 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.">
|
||||
2
resources/Types/testType7.rosetta
Normal file
2
resources/Types/testType7.rosetta
Normal 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.">
|
||||
12
resources/testFunction.rosetta
Normal file
12
resources/testFunction.rosetta
Normal file
@@ -0,0 +1,12 @@
|
||||
func EquityPriceObservation: <"Function specification for the observation of an equity price, based on the attributes of the 'EquityValuation' class.">
|
||||
inputs:
|
||||
equity Equity (1..1)
|
||||
valuationDate AdjustableOrRelativeDate (1..1)
|
||||
valuationTime BusinessCenterTime (0..1)
|
||||
timeType TimeTypeEnum (0..1)
|
||||
determinationMethod DeterminationMethodEnum (1..*)
|
||||
output:
|
||||
observation ObservationPrimitive (1..1)
|
||||
|
||||
assign-output
|
||||
observation: if asd exists then var2
|
||||
Reference in New Issue
Block a user