Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AST: Add filetype and schema fields #126

Merged
merged 1 commit into from
Jul 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading