Skip to content

Переменной нельзя присвоить значение функции  #253

Description

@universome

Можно потестировать на playground следующий код

module "hello"

match / {
    <div class="parent">
        apply . my_template
    </div>
}

match .* my_template {
    my_variable = some_func() // Просто перекладываем значение функции в переменную!

    <h1 class="child"></h1>
}

func some_func() {
    <h1>"kek"</h1>
}

Как видно, шаблон child криво вставляется внутрь родителя:

<div<h1 class="child"></h1></div>

Актуально для версии 0.0.80

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions