Search in sources :

Example 1 with Atom

use of de.prob.translator.types.Atom in project probparsers by bendisposto.

the class TestTranslator method testTranslateIdentifier.

@Test
public void testTranslateIdentifier() throws Exception {
    Atom idx = (Atom) Translator.translate("x");
    assertEquals(idx.getValue(), "x");
}
Also used : Atom(de.prob.translator.types.Atom) Test(org.junit.Test)

Example 2 with Atom

use of de.prob.translator.types.Atom in project probparsers by bendisposto.

the class TranslatingVisitor method caseARecEntry.

@Override
public void caseARecEntry(ARecEntry node) {
    Atom key = null;
    BObject value = null;
    node.getIdentifier().apply(this);
    key = (Atom) this.getResult();
    node.getValue().apply(this);
    value = this.getResult();
    this.setResult(new RecordEntry(key, value));
}
Also used : BObject(de.prob.translator.types.BObject) Atom(de.prob.translator.types.Atom)

Aggregations

Atom (de.prob.translator.types.Atom)2 BObject (de.prob.translator.types.BObject)1 Test (org.junit.Test)1