Skip to content

Commit

Permalink
fixing static errors in standard library
Browse files Browse the repository at this point in the history
  • Loading branch information
jurgenvinju committed Mar 27, 2024
1 parent 312d513 commit 7ceb735
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 12 deletions.
11 changes: 3 additions & 8 deletions src/org/rascalmpl/library/analysis/formalconcepts/FCA.rsc
Original file line number Diff line number Diff line change
Expand Up @@ -147,19 +147,14 @@ map[Concept[&Object, &Attribute], int] makeNodes(ConceptLattice[&Object, &Attrib
return r;
}

set[&Attribute] newAdded1(ConceptLattice[&Object, &Attribute] q, Concept[&Object, &Attribute] c) {
set[&Attribute] addConcept(ConceptLattice[&Object, &Attribute] q, Concept[&Object, &Attribute] c) {
set[Concept[&Object, &Attribute]] parents = range(domainR(q, {c}));
return c[1] - union({p[1]|Concept[&Object, &Attribute] p <-parents});
}
}

set[Concept[&Object, &Attribute]] newAdded0(ConceptLattice[&Object, &Attribute] q, Concept[&Object, &Attribute] c) {
set[Concept[&Object, &Attribute]] parents = domain(rangeR(q, {c}));
return c[0] - union({p[0]|Concept[&Object, &Attribute] p <-parents});
}

Stm compose(Concept[&Object, &Attribute] c, map[Concept[&Object, &Attribute], int] z, bool lab) {
return N("\"<z[c]>\"", lab?[<"label", "<c>">]:[]);
}
}



Expand Down
2 changes: 1 addition & 1 deletion src/org/rascalmpl/library/lang/box/util/Box2Text.rsc
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public text box2html(Box b) {
}

@synopsis{Converts boxes into list of lines (ASCII)}
public text box2text(Box b) {
public text box2text(Box b) {
text q = [];
if (box2textmap[b]?) q = box2textmap[b];
else {
Expand Down
2 changes: 1 addition & 1 deletion src/org/rascalmpl/library/lang/yaml/Model.rsc
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public Node BAD_YAML =
scalar("unsupported")[\tag=#node],
reference(anchor=4),
sequence([])[anchor=4]
])[@anchor=2]))[anchor=2];
])[anchor=2]))[anchor=2];

public test bool testLoadDump() {
Node n = loadYAML(TEST_YAML);
Expand Down
4 changes: 2 additions & 2 deletions src/org/rascalmpl/library/util/Validator.rsc
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ private data RuntimeException = none();
Symbol unlabel(label(_, Symbol sym)) = sym;
default Symbol unlabel(Symbol sym) = sym;

if (expected.symbol == \node()) {
return v;
if (expected.symbol == \node(), &T vv := v) {
return vv;
}

if (def:adt(_, _) := expected.symbol, grammar := expected.definitions) {
Expand Down

0 comments on commit 7ceb735

Please sign in to comment.