Class ProgramHttpWiringOrError

java.lang.Object
org.ek9lang.compiler.phase5.ProgramHttpWiringOrError
All Implemented Interfaces:
Consumer<org.antlr.v4.runtime.tree.ParseTree>

final class ProgramHttpWiringOrError extends Object implements Consumer<org.antlr.v4.runtime.tree.ParseTree>
Validates that program HTTP wiring is consistent with application service registrations.
  • E12020: Linked application registers services but the program creates no HTTP
  • E12021: Program has HTTP but linked application has no service registrations
  • E12022: Program has HTTP but no 'with application of' linkage
  • E12023: Program creates more than one HTTP instance

E12020 and E12021 are the two directions of the same wiring mistake, and both are decidable here because the application's registrations and the program's variable declarations are already resolved. Verified empirically: a program whose application registers a service but which never creates HTTP runs its body and EXITS — the service is constructed and can never receive a request, so the registration is dead wiring rather than a style preference.

  • Constructor Details

  • Method Details

    • accept

      public void accept(org.antlr.v4.runtime.tree.ParseTree ctx)
      Specified by:
      accept in interface Consumer<org.antlr.v4.runtime.tree.ParseTree>