Skip to content

Constant reference round-trip broken: DESCRIBE outputs @Module.Const but parser rejects @ syntax #178

@engalar

Description

@engalar

Problem

DESCRIBE MICROFLOW outputs constant references using @Module.ConstantName syntax, but this syntax is rejected by the parser when used in CREATE MICROFLOW or CREATE OR REPLACE MICROFLOW.

This breaks the round-trip guarantee: you cannot take the output of DESCRIBE and feed it back into CREATE.

Reproduction

-- 1. Create a microflow that references a constant (using the working syntax)
CREATE MICROFLOW MyModule.Test ()
BEGIN
  DECLARE $val String = getConstantValue('MyModule.MyConstant');
  RETURN;
END;

-- 2. DESCRIBE outputs:
--    DECLARE $val String = @MyModule.MyConstant;

-- 3. Copy-paste the DESCRIBE output into a new CREATE statement → parse error:
--    extraneous input '@' expecting { ... }

Expected behavior

Either:

  1. Parser should accept @Module.Const syntax (matching DESCRIBE output), OR
  2. DESCRIBE should output getConstantValue('Module.Const') (matching what the parser accepts)

Option 1 is preferred — @Module.Const is cleaner and the DESCRIBE output should be valid MDL.

Workaround

Use getConstantValue('Module.ConstantName') instead of @Module.ConstantName when writing MDL scripts.

Impact

Anyone who uses DESCRIBE output as a starting point for modifying microflows (a common workflow) will hit a cryptic parse error. Especially confusing because the @ syntax looks intentional and correct.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions