-
Notifications
You must be signed in to change notification settings - Fork 0
DescribeGrammar dot notation
The idea behind the "dot notation" scheme is to use namespaces to form complex dot "." separated ids. Instead of writing long ids though, we can use the namespace directive to set the namespace for the current file, and it will then be added as prefix to every id that starts with a dot. This is so, because if we have a namespaced id, we need the ability to tell if it is a child namespace we are referring to and needs to be added to the current namespace - so we prefix it with a dot, like <.cars.rnode>
, or if it is a full path of its own <cars.rnode>
e.g.
Tag ids without a dot are called local ids, and can be referenced only in that particular file. What happens behind the scenes is that the transpiler creates a random namespace for each file being parsed, and that local namespace is appended to that id. This is done in order to avoid collisions in different files.
Looking at the example 3 files below, we can observe that:
- it is customary to name folders after namespaces,
- it is customary that each folder contains one root source file, that is prefixed with dot '.' symbol,
- root files often contain one root element, which can be tagged with an id like
rnode
, which stands for "root node" - namespace directive is used to add to id's:
Example (file-path: Public\.public.ds
):
file-path: Public\Culture\.culture.ds
:
file-path: Public\Science\.science.ds
:
Home
Grammar How To
Compiler How To
CLI Compiler - How to
CLI Compiler - How to - help
CLI Compiler - How to - parse-file
CLI Compiler - How to - parse-folder
CLI Compiler - How to - encrypt-file
CLI Compiler - How to - decrypt-file
CLI Compiler - How to - recrypt-file
CLI Compiler - How to - encrypt-folder
CLI Compiler - How to - decrypt-folder
CLI Compiler - How to - recrypt-folder
API Compiler - How to
API Compiler - How to - Example 1
API Compiler - How to - Example 2
API Compiler - How to - Example 3
API Compiler - How to - Example 4
API Compiler - How to - Example 5
AWS Compiler - How to
AWS technical overview
API gateway configuration
output - low
output - medium
output - high
output - themes
Grammar - Lists
Grammar - Comments
Grammar - Links
Grammar - Decorators
Grammar - Tags
Grammar - More on Tags
Grammar - Directives
Grammar - Dot Notation
Grammar - Tildes
Grammar - Files
Deprecated - Slash Notation
Deprecated - Delimiter Mode
Describe Basics - v0.6
Describe Tags - v0.7
Describe Links - v0.8
Describe Decorators - v0.9
Describe Lines - v1.0
Describe Doubles - v1.1