Navigation.jrag 1.49 KB
Newer Older
1
2
aspect Navigation {

3
  // --- program ---
4
5
  inh Program ASTNode.program();
  eq Program.getChild().program() = this;
6
  eq Ros2Rag.getChild().program() = getProgram();
7

8
9
10
11
12
  // --- ros2rag
  inh Ros2Rag ASTNode.ros2rag();
  eq Ros2Rag.getChild().ros2rag() = this;

  // --- typeDecls ---
13
14
15
16
17
  coll java.util.Set<TypeDecl> Program.typeDecls() [new java.util.HashSet<>()] root Program;
  TypeDecl contributes this
    to Program.typeDecls()
    for program();

18
  // --- relations ---
19
20
21
22
23
  coll java.util.Set<Relation> Program.relations() [new java.util.HashSet<>()] root Program;
  Relation contributes this
    to Program.relations()
    for program();

24
  // --- containingTypeDecl ---
25
26
27
28
29
30
31
32
33
34
  inh TypeDecl Component.containingTypeDecl();
  eq TypeDecl.getChild().containingTypeDecl() = this;

//  syn boolean RelationComponent.multiplicityOne() = false;
//  eq OneRelationComponent.multiplicityOne() = true;
//  syn boolean RelationComponent.multiplicityOpt() = false;
//  eq OptionalRelationComponent.multiplicityOpt() = true;
//  syn boolean RelationComponent.multiplicityMany() = false;
//  eq ManyRelationComponent.multiplicityMany() = true;

35
  // --- containedFile ---
36
37
  inh GrammarFile ASTNode.containedFile();
  eq GrammarFile.getChild().containedFile() = this;
38
39
40
41
42
43
44
45

  // --- isTokenComponent ---
  syn boolean Component.isTokenComponent() = false;
  eq TokenComponent.isTokenComponent() = true;

  // --- asTokenComponent ---
  syn TokenComponent Component.asTokenComponent() = null;
  eq TokenComponent.asTokenComponent() = this;
46
}