mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[Expressions] Add support of comments (#122457)
* Add comments support to the expressions grammar * Add typings to the interpreter parser * Add expressions comments highlighting * Update canvas to preserve original expression formatting * Update documentation to cover comments
This commit is contained in:
parent
022a9efa5e
commit
6ae646722b
29 changed files with 644 additions and 272 deletions
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
|
||||
import { cloneDeep, mergeWith } from 'lodash';
|
||||
import { fromExpression, toExpression, Ast, ExpressionFunctionAST } from '@kbn/interpreter';
|
||||
import { fromExpression, toExpression, Ast, AstFunction } from '@kbn/interpreter';
|
||||
import {
|
||||
SavedObjectMigrationMap,
|
||||
SavedObjectMigrationFn,
|
||||
|
@ -141,7 +141,7 @@ const removeLensAutoDate: SavedObjectMigrationFn<LensDocShapePre710, LensDocShap
|
|||
}
|
||||
try {
|
||||
const ast = fromExpression(expression);
|
||||
const newChain: ExpressionFunctionAST[] = ast.chain.map((topNode) => {
|
||||
const newChain: AstFunction[] = ast.chain.map((topNode) => {
|
||||
if (topNode.function !== 'lens_merge_tables') {
|
||||
return topNode;
|
||||
}
|
||||
|
@ -202,7 +202,7 @@ const addTimeFieldToEsaggs: SavedObjectMigrationFn<LensDocShapePre710, LensDocSh
|
|||
|
||||
try {
|
||||
const ast = fromExpression(expression);
|
||||
const newChain: ExpressionFunctionAST[] = ast.chain.map((topNode) => {
|
||||
const newChain: AstFunction[] = ast.chain.map((topNode) => {
|
||||
if (topNode.function !== 'lens_merge_tables') {
|
||||
return topNode;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue