How to use the adaptive-expressions.ExpressionParser function in adaptive-expressions

To help you get started, we’ve selected a few adaptive-expressions examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github microsoft / BotBuilder-Samples / experimental / generation / generator / packages / library / src / dialogGenerator.ts View on Github external
function getExpressionEngine(): expressions.ExpressionParser {
    if (!expressionEngine) {
        expressionEngine = new expressions.ExpressionParser((func: string): any => {
            switch (func) {
                case 'phrase': return ph.PhraseEvaluator
                case 'phrases': return ph.PhrasesEvaluator
                case 'substitutions': return SubstitutionsEvaluator
                default:
                    return expressions.ExpressionFunctions.standardFunctions.get(func)
            }
        })
    }
    return expressionEngine
}