nokia / ntt

Modern tools for TTCN-3

Home Page:https://nokia.github.io/ntt/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support ranged enumeration values

5nord opened this issue · comments

Support enumerated labels which represent multiple values.

Example from the standard:

type enumerated MyThirdEnumType {
    Blue(0),
    Yellow(1),
    Green(3),
    Other(2, 4..255)
}

Originally posted by @5nord in #637 (comment)

this is already supported:

		{`type enumerated MyThirdEnumType {Blue(0),Yellow(1),Green(3),Other(2, 4..255)}; MyThirdEnumType`,
			NewEnumTypeWithIds(
				"MyThirdEnumType",
				"Blue", []runtime.EnumRange{{First: 0, Last: 0}},
				"Yellow", []runtime.EnumRange{{First: 1, Last: 1}},
				"Green", []runtime.EnumRange{{First: 3, Last: 3}},
				"Other", []runtime.EnumRange{{First: 2, Last: 2}, {First: 4, Last: 255}},
			),
		},

passes

Implemented in #637