api2021 part I #5

Merged
tomasz.sowa merged 5 commits from api2021 into master 2021-05-27 10:41:17 +02:00

5 Commits

Author SHA1 Message Date
Tomasz Sowa 0ac8e05c04 changed semantic of [def] statements:
- [def] is used to define a variable (like before)
  but if we assign a string such as [def var "string"] the string is evaluated to bool
  in a different way: empty string is false, not empty string is true
- added [def?] statement - similar like [def] but define a variable only if such
  a variable is not already defined
- added [let] statement - similar like [def] but with lazy evaluation (it is an alias to a function)
  if it is called to assign a string e.g. [let var "string"] then this has the
  same meaning like [def] - an alias is only created when we assign a function e.g. [let var my_function]
  both [def] and [let] are using the same Vars object
- added [let?] - make an alias but only if such a variable is not already defined
- a std::map of variables moved outside of Generator
  added method void SetVariables(Vars & variables);
- fixed: a result status was not correctly propagated when evaluating [def] statements,
  this was in Call(...) function: last_res from variables was set in Find()
  but later was overwritten by Call(...) called for parameters (recursively)
2021-05-23 10:02:51 +02:00
Tomasz Sowa 6f6df9524c updated to the new pikotools api: changed utf8 functions PascalCase to snake_case 2021-05-21 00:32:05 +02:00
Tomasz Sowa cd1c24d0a5 updated to new pikotools api: namespace PT renamed to pt 2021-05-20 16:12:41 +02:00
Tomasz Sowa d1a15ad153 make depend 2021-05-14 21:02:56 +02:00
Tomasz Sowa 29c7163d9b updated to the new pikotools api (api2021 branch) 2021-05-14 21:02:27 +02:00