adding compiler check for external IDs sync
authorVolker Birk <vb@pep-project.org>
Fri, 22 Mar 2019 21:18:06 +0100
branchsync
changeset 3385a4c2e473cffd
parent 3384 32c0ea31dd6d
child 3386 b27c90cda355
adding compiler check for external IDs
sync/gen_statemachine.ysl2
     1.1 --- a/sync/gen_statemachine.ysl2	Fri Mar 22 21:10:34 2019 +0100
     1.2 +++ b/sync/gen_statemachine.ysl2	Fri Mar 22 21:18:06 2019 +0100
     1.3 @@ -769,8 +769,11 @@
     1.4              |> «$name» = «/protocol/fsm/message[@name=$name]/@id»,
     1.5          }
     1.6          |> «@name»_event_Extra = Extra,
     1.7 -        for "/protocol/fsm/external"
     1.8 +        for "/protocol/fsm/external" {
     1.9 +            if "@id < 128"
    1.10 +                error > external «@name» must have ID >= 128 but it's «@id»
    1.11              |> «@name» = «@id»,
    1.12 +        }
    1.13          for "func:distinctName(state/event[not(../../message/@name=@name or ../../external/@name=@name)])" {
    1.14              if "@name!='Init'"
    1.15                  |> «@name»`if "position()!=last()" > , `