Skip to content

Commit c705cd1

Browse files
committed
Add an important note about the importance of scope ordering.
1 parent 6e51183 commit c705cd1

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

README.md

+13
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,19 @@ If you intend to submit a pull request, please follow the following guidelines:
229229
- update unit tests and add new ones if needed, keeping the test cases short
230230
whenever possible
231231

232+
### Multiple scopes
233+
234+
It is sometimes necessary to assign multiple scopes to the same
235+
matched group. It is *very important* to keep in mind that the order
236+
of these scopes is apparently treated as significant by the engines
237+
processing the grammar specs. However, it is equally important to know
238+
that different specification formats seem to have different order of
239+
importance (most important first vs. last). Since we try to create
240+
grammar that can be compiled into several different formats, we must
241+
chose one convention and then translate it when necessary during
242+
compilation step. Our convention is therefore that *most important
243+
scope goes first*.
244+
232245
## Color Scheme
233246

234247
If you want to write your own color scheme for MagicPython you can

0 commit comments

Comments
 (0)