-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsymbol.rnc
72 lines (63 loc) · 2.22 KB
/
symbol.rnc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# Grammar defining the <symbol> element used in syntaxes.
# https://docs.nova.app/syntax-reference/symbols/#defining-a-symbol-s-scope
default namespace = ""
Symbol = element symbol {
TypeAttr &
ScopeAttr? &
AnonymousAttr? &
NameSelectorAttr? &
DisplayName? &
Filter? &
Context?
}
## https://docs.nova.app/syntax-reference/symbols/#defining-a-symbol-s-type
TypeAttr = attribute type { string }
## https://docs.nova.app/syntax-reference/symbols/#defining-a-symbol-s-scope
ScopeAttr =
attribute scope { "global"|"private"|"local"|"external" }
AnonymousAttr = attribute anonymous { xsd:boolean }
## https://docs.nova.app/syntax-reference/symbols/#computing-a-symbols-name
NameSelectorAttr = attribute name-selector { string }
## https://docs.nova.app/syntax-reference/symbols/#computing-a-symbol-s-display-name
DisplayName =
element display-name {
element component {
attribute variable { "name" }?,
attribute selector { string }?,
attribute prepend { string }?,
attribute append { string }?,
attribute replace { string }?,
attribute replace-with { string }?
}+
}
## https://docs.nova.app/syntax-reference/symbols/#filtering-symbols
Filter =
element filter {
attribute match-start { string }?,
attribute match-end { string }?
}
## https://docs.nova.app/syntax-reference/symbols/#symbolic-contexts
Context =
element context {
attribute behavior { "subtree"|"whitespace"|"start"|"end"|"next" }?,
attribute group { string }?,
attribute group-by-name { xsd:boolean }?,
Priority,
attribute export-local { xsd:boolean }?,
UnclosedAttr?,
attribute foldable { xsd:boolean }?,
attribute fold-type { string }?,
attribute arguments { xsd:boolean }?,
## https://docs.nova.app/syntax-reference/symbols/#auto-closing
element auto-close {
attribute string { string }?,
attribute completion { string }?,
attribute indentation { "auto"|"none" }?
}?
}?
UnclosedAttr =
attribute unclosed {
"extend-parent"|"extend-document"|"truncate"|
## undocumented
"parent"
}