Skip to content

Commit

Permalink
Fix the introduction and appendix
Browse files Browse the repository at this point in the history
  • Loading branch information
Lotes committed Aug 6, 2024
1 parent aca7c97 commit 5385911
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
9 changes: 2 additions & 7 deletions hugo/content/docs/recipes/scoping/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,11 @@ In general, the way we resolve references is split into three phases of the docu
- [Scope computation](/docs/reference/document-lifecycle#computing-scopes) determines which elements are reachable from a given position in your document.
- Finally, the [linking phase](/docs/reference/document-lifecycle#linking) eagerly links each reference within a document to its target using your language's scoping rules.

In this guide, we'll look at different scoping kinds and styles and see how we can achieve them using Langium:
In this recipe, we'll look at different scoping kinds and styles and see how we can achieve them using Langium:

1. [Qualified Name Scoping](/docs/recipes/scoping/qualified-name)
2. [Class Member Scoping](/docs/recipes/scoping/class-member)
3. [File-based scoping](/docs/recipes/scoping/file-based)

Note that these are just example implementations for commonly used scoping methods.
The scoping API of Langium is designed to be flexible and extensible for any kind of use case.

## Other kinds of scoping

Also mind the following scoping kinds:

- [File-based scoping](/docs/recipes/scoping/file-based)
2 changes: 1 addition & 1 deletion hugo/content/docs/recipes/scoping/file-based.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ import { HelloWorldAstType, Model, Person } from "./generated/ast.js";
import { dirname, join } from "node:path";

export class HelloWorldScopeComputation extends DefaultScopeComputation {
override async computeExports(document: LangiumDocument<AstNode>, _cancelToken?: CancellationToken | undefined): Promise<AstNodeDescription[]> {
override async computeExports(document: LangiumDocument<AstNode>): Promise<AstNodeDescription[]> {
const model = document.parseResult.value as Model;
return model.persons
.filter(p => p.published)
Expand Down

0 comments on commit 5385911

Please sign in to comment.