From 1957eb1fc558970dffda3be819e5b1acc4fc0b2b Mon Sep 17 00:00:00 2001 From: Krasimir Angelov Date: Mon, 12 Sep 2022 12:20:30 +0200 Subject: [PATCH] more comments --- src/runtime/javascript/test-web.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/runtime/javascript/test-web.js b/src/runtime/javascript/test-web.js index e32f64069..6f881f7ef 100644 --- a/src/runtime/javascript/test-web.js +++ b/src/runtime/javascript/test-web.js @@ -9,9 +9,13 @@ mkAPI().then((pgf) => { console.log('arity', expr.arity()); pgf.readPGF("Foods.pgf").then((gr) => { - // Print its name + // Print the grammar name console.log(gr.abstractName); + + // Access a language and print the concrete name console.log(gr.languages["FoodsEng"].name); + + // Linearize an expression console.log(gr.languages["FoodsEng"].linearize(expr)); }); });