Skip to content

Conversation

cosmicshuai
Copy link
Contributor

@cosmicshuai cosmicshuai commented Aug 14, 2020

Issue reported by @chrimc62 that the injected LG function don't have access to global state (DSM state).

This PR enable injected LG template functions to access global memories.

Suppose we have a template, with a global variable {user: {name: "user1", date: "2001-01-01"}, }

> !# @strict = false
> !# @namespace = Adaptive
> !# @Exports = UserDataConcat

#UserDataConcat()
- ${user.name} : ${user.date}

The result of evaluating the expression Expression.parse("Adaptive.UserDataConcat()") is user1 : 2001-01-01

@cosmicshuai cosmicshuai requested a review from a team as a code owner August 14, 2020 07:25
@cosmicshuai cosmicshuai requested a review from luhan2017 August 14, 2020 07:25
@boydc2014 boydc2014 requested a review from chrimc62 August 14, 2020 11:52
Copy link

@chrimc62 chrimc62 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants