Skip to content
This repository has been archived by the owner on Feb 1, 2020. It is now read-only.

Commit

Permalink
Merge pull request #2141 from kframework/hotfix/rename-wrapped-to-inj…
Browse files Browse the repository at this point in the history
…ected-klabel

rename wrapped to injected klabel
  • Loading branch information
andreistefanescu committed Feb 9, 2016
2 parents 8e4a0ce + 8fc7cc1 commit 06e4412
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion k-distribution/include/builtin/kast.k
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ module KAST
imports BASIC-K
imports KSTRING
syntax KBott ::= "#token" "(" KString "," KString ")" [klabel(#KToken), hook(org.kframework.kore.KToken)]
| "#klabel" "(" KLabel ")" [klabel(#WrappedKLabel), hook(org.kframework.kore.meta.WrappedKLabel)]
| "#klabel" "(" KLabel ")" [klabel(#InjectedKLabel), hook(org.kframework.kore.InjectedKLabel)]
| KLabel "(" KList ")" [klabel(#KApply), hook(org.kframework.kore.KApply)]
syntax KItem ::= KBott [allowChainSubsort]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ object TreeNodesToKORE {
KApply(downKLabel(items(0)),
KList(downList(Assoc.flatten(KLabel("#KList"), items.tail, KLabel("#EmptyKList")))), t.att)

case t@KApply(KLabel("#WrappedKLabel"), items) =>
case t@KApply(KLabel("#InjectedKLabel"), items) =>
InjectedKLabel(downKLabel(items(0)), t.att)

case t@KApply(KLabel("#KToken"), items) =>
Expand Down
6 changes: 3 additions & 3 deletions kore/src/test/scala/org/kframework/unparser/UnparseTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ class UnparseTest {
Assert.assertEquals("`_+_`",ToKast(KLabel("_+_")))
}

@Test def WrappedKLabel() {
Assert.assertEquals("#klabel(foo)",ToKast(InjectedKLabel('foo, Att())))
@Test def InjectedKLabel() {
Assert.assertEquals("#klabel(foo)",ToKast(ADT.InjectedKLabel('foo, Att())))
}

@Test def EmptyApp() {
Expand Down Expand Up @@ -64,7 +64,7 @@ class UnparseTest {
@Test def testKeywords(): Unit = {
Assert.assertEquals("#a(.KList)~>`#klabel`(.KList)~>#klabel(test)~>`#token`(.KList)~>#token(\"1\",\"Int\")",
ToKast(KSequence(KLabel("#a")(),
KLabel("#klabel")(), InjectedKLabel(KLabel("test"),Att()),
KLabel("#klabel")(), ADT.InjectedKLabel(KLabel("test"),Att()),
KLabel("#token")(), KToken("1", Sort("Int")))))
}
}

0 comments on commit 06e4412

Please sign in to comment.