@malloydata/malloy 0.0.61-dev230724171210 → 0.0.61-dev230724182630
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -198,6 +198,11 @@ class MalloyToAST extends AbstractParseTreeVisitor_1.AbstractParseTreeVisitor {
|
|
|
198
198
|
throw this.internalError(pcx, `Source expected, but ${source.elementType} found`);
|
|
199
199
|
}
|
|
200
200
|
makeSqlString(pcx, sqlStr) {
|
|
201
|
+
for (const part of pcx.sqlInterpolation()) {
|
|
202
|
+
if (part.CLOSE_CODE() && this.m4WarningsEnabled()) {
|
|
203
|
+
this.contextError(part, 'Use %{ ... } instead of %{ ... }%', 'warn');
|
|
204
|
+
}
|
|
205
|
+
}
|
|
201
206
|
for (const part of (0, parse_utils_1.getStringParts)(pcx)) {
|
|
202
207
|
if (part instanceof antlr4ts_1.ParserRuleContext) {
|
|
203
208
|
sqlStr.push(this.visit(part));
|
|
@@ -758,6 +763,9 @@ class MalloyToAST extends AbstractParseTreeVisitor_1.AbstractParseTreeVisitor {
|
|
|
758
763
|
const topN = this.getNumber(pcx.INTEGER_LITERAL());
|
|
759
764
|
let top;
|
|
760
765
|
if (byCx) {
|
|
766
|
+
if (this.m4WarningsEnabled()) {
|
|
767
|
+
this.contextError(byCx, 'by clause of top statement unupported. Use order_by instead', 'warn');
|
|
768
|
+
}
|
|
761
769
|
const nameCx = byCx.fieldName();
|
|
762
770
|
if (nameCx) {
|
|
763
771
|
const name = this.getFieldName(nameCx);
|