Skip to content

Commit

Permalink
AST: Add filetype and schema fields
Browse files Browse the repository at this point in the history
The rationale is provided in the comments and documentation.  These are
optional fields and therefore a backwards compatible change.  A new
_minor_ version of the specification is appropriate.

Signed-off-by: Gunnar Andersson <[email protected]>
  • Loading branch information
gunnar-mb committed Jul 2, 2024
1 parent 76a0857 commit f57ab3d
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions ifex/model/ifex_ast.py
Original file line number Diff line number Diff line change
Expand Up @@ -645,6 +645,23 @@ class AST():
includes: Optional[List[Include]] = field(default_factory=EmptyList)
namespaces: Optional[List[Namespace]] = field(default_factory=EmptyList)

# The following two arguments are strictly not necessary for IFEX Core IDL
# files, however to prepare for differentiating between multiple Layer
# Types, these fields are added here, with the intention that all future
# Layer Types shall also include them. For this AST model, which defines
# the IFEX Core IDL, the value shall always be written as indicated here.
# Other Layer types may define their own name for the filetype.
filetype: Optional[str] = "IFEX Core IDL"

# The schema field may optionally be a filename (typically to communicate
# the schema name to a human) or a URI (typically to communicate to tools
# where to fetch the schema). **If** a more strict definition is required
# (for example if a particular tool MUST be able to download the schema to
# function correctly), then it is up to that tool to inform the tool user
# that the value must be a complete URI.
schema: Optional[str] = str()


class FundamentalTypes:
# Fundamental types are the same as for VSS (Vehicle Signal Specification)
# This table copied from VSS documentation:
Expand Down

0 comments on commit f57ab3d

Please sign in to comment.