Skip to content

Commit 8097d46

Browse files
Explain what parsing and evaluating are in the contributor docs
1 parent 841d019 commit 8097d46

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

CONTRIBUTING.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,13 @@ flowchart TB
7474
3. [ParseDataProvider](server/src/parseDataProvider.ts) reads the file using the `fileContentProvider`, ...
7575
4. ... which caches the file contents, to avoid re-reading files that have not changed.
7676
5. [ParseDataProvider](server/src/parseDataProvider.ts) parses the file using [parser.ts](server/src/parser.ts), ...
77-
6. ... which parses it using the compiled `fbuild-grammar.ts` from step 0.
77+
6. ... which parses it using the compiled `fbuild-grammar.ts` from step 0. This generates tokens and metadata.
7878
7. [ParseDataProvider](server/src/parseDataProvider.ts) caches the parse data, to avoid re-parsing files that have not changed.
79-
8. The [server](server/src/server.ts) evaluates the parsed data using [evaluator.ts](server/src/evaluator.ts).
79+
8. The [server](server/src/server.ts) evaluates the parsed data using [evaluator.ts](server/src/evaluator.ts). This involves:
80+
* Evaluating each statement while maintaining state for variables/defines
81+
* Evaluating `If`, `ForEach`, `Using`, etc.
82+
* `#include`ing other files
83+
* etc.
8084
9. Evaluating the parsed data parses and evaluates any `#import`ed files.
8185
10. The [server](server/src/server.ts) caches the evaluated data, so that it can use it for future operations.
8286
11. The [server](server/src/server.ts) updates the diagnostics (e.g. errors) based on the evaluation.

0 commit comments

Comments
 (0)