67 Commits (master)

Author SHA1 Message Date
Adam Pippin 326e856a2b Cleanup 3 years ago
Adam Pippin 0265db1946 Rework expression parser to not solve on creation; re-add dependency solving for variables in expressions in variables block 3 years ago
Adam Pippin 6f90b5d222 Bugfix: Fix processing order for functions -- deepest nodes first 3 years ago
Adam Pippin 8dd7b8d1f0 Re-add !expr function 3 years ago
Adam Pippin 4294c5b007 Add concat/select operators 3 years ago
Adam Pippin 6ddf1531af Add boolean literals to expression parser 3 years ago
Adam Pippin 706242074d Allow !replace to accept a scalar 3 years ago
Adam Pippin 9e5adfb9ce Bugfix: !if that creates cfn conditions properly replaces parent node 3 years ago
Adam Pippin a3fe71526d Bugfix: generating Fn::If without false caused error 3 years ago
Adam Pippin 9a99fc315b Bugfix: expression binary operators were dropping children 3 years ago
Adam Pippin 2b619d767b Remove old expression parser 3 years ago
Adam Pippin 41b26006ac Cleanup + comments 3 years ago
Adam Pippin 22aa9e068f Update fn::if to use new expression parser and generate conditions where appropriate 3 years ago
Adam Pippin f58cd9129d Add an `addCondition` method to compiler for calling from functions 3 years ago
Adam Pippin 27774c84c6 Expression bug fix replacing variables; add string literal 3 years ago
Adam Pippin 5d0afd4984 Reimplement expression parser 3 years ago
Adam Pippin 01b036b284 Move cfnpp code out from under engine namespace 3 years ago
Adam Pippin 60f8d2be60 Also look at variables referenced in expressions when determining dependencies between variables 3 years ago
Adam Pippin 400542bc12 Specify some functions callable from expressions 3 years ago
Adam Pippin 6485b4f5a1 Add !expr function to allow inserting the result of evaluating an expression 3 years ago
Adam Pippin a2d5324840 Allow expression evaluator to return an array if stack contains multiple values 3 years ago
Adam Pippin d4d457340a Fix bug in expression string literal parser 3 years ago
Adam Pippin 07e9fc2a3a Cleanup 3 years ago
Adam Pippin 497f23594e Add basic !if function 3 years ago
Adam Pippin 6b3eaa6833 First pass at expression parser/evaluator 3 years ago
Adam Pippin b470283fde Fix potential bug where using !unset on a variable would result in a crash 3 years ago
Adam Pippin 9f5dda08de Add compiler pass 2 - run remaining functions 3 years ago
Adam Pippin 5a1b4f3402 Add compiler pass 1 -- resolve dependencies between variables and evaluate values 3 years ago
Adam Pippin 1cdadf4521 Have dependency graph throw an exception rather than return nothing when no edge nodes are present 3 years ago
Adam Pippin 1fd4bfb2b8 Cleanup 3 years ago
Adam Pippin 0c70de8e8a Compiler pass 0 using new dependency graph/etc 3 years ago
Adam Pippin 9dbe97a3ec Don't write state information into metadata from engine as all the actual state is now in compiler 3 years ago
Adam Pippin d167f08e24 Add File::clear() to allow clearing and reusing/modifying file resolver 3 years ago
Adam Pippin be9857cd2f Add super rudimentary dependency graph solver 3 years ago
Adam Pippin 145b89da1e Add generic methods for converting DOM<->PHP, updated places where this is useful 3 years ago
Adam Pippin 1bb3e50cfb Move cfnpp stuff into its own namespace 3 years ago
Adam Pippin 8722279af6 Remove all logic besides "load files, pass to compiler" from Engine 3 years ago
Adam Pippin 4b26a910af Have the compiler passed the entire set of documents + state to facilitate moving the higher-level compilation logic into the compiler 3 years ago
Adam Pippin f3a3d21a36 Track parameters like variables 3 years ago
Adam Pippin c0b4fd7dd3 Code cleanup 3 years ago
Adam Pippin 300de19fe5 Bugfix: recent list of includes between each file 3 years ago
Adam Pippin 6ce8dec215 Add !var to use value of variable as value 3 years ago
Adam Pippin 6b8439e3c2 Bugfix: don't try and iterate over the thing we're modifying 3 years ago
Adam Pippin 4056674c1d Rework Engine::process, handle variables in meta block 3 years ago
Adam Pippin 0f6185d9d8 Update compiler options to hold variables 3 years ago
Adam Pippin de247299cd Pass options in to compiler at construction instead of with each pass 3 years ago
Adam Pippin 2f197b4b51 Update domdocument to allow fetching maps from meta 3 years ago
Adam Pippin 56a023959f Fix off by... many error -- only walk array index back 1 to reprocess, not more 3 years ago
Adam Pippin 460168401e Write list of yaml files processed to Metadata section of output (poc) 3 years ago
Adam Pippin db66e2cabf Replace findNodeByPath with iterative implementation 3 years ago