Age | Commit message (Collapse) | Author | Files | Lines |
|
The implementation no longer needs to transform resource expressions
to 3x AST. This changes the transformer to raise an error if attempted.
The spec test for resource transformation is also dropped. No new
test added that transformer raises exceptions for resource
transformation since all transformation eventually will be dropped.
|
|
Tag function should not require parentheses.
|
|
Previously, an unparenthesized call followed by a hash would always
result in an error that the hash was a resource body without title.
The change now treats the resource body without title as an opportunity
to transform the expression into a hash (and subsequently into a
call with a hash as an argument).
At the same time, the set of functions this is available for has been
reduced to realize, require, contain, include, and the logging functions
notice, info, warning, error, and the fail function.
|
|
The support is removed (basically a mapping of a function call
to the function "import" to a ImportExpression + removing tests.
The intermediate future parser is still using ImportExpression, so
model and related logic not changed, but marked with deprecation
and "to be removed in Puppet 4" (or whenever the intermediate parser
is removed from the code base).
The grammar/parser is modified, but this is only a removal of a comment.
|
|
This makes the future parser use the new faster lexer.
As a consequence features provided by the old lexer has now moved
to the parser (keeping track of namestack).
Locator information is still not optimized wrt the parser as the
tokens/locator information are adapter to the "old" way
(room for performance improvements).
Tests are updated as the new lexer is both more restrictive, and in
some case more relaxed (where regular expressions may occur).
|
|
This removes the two alternative lambda syntax forms from the grammar
and changes (and removes) tests that were testing (or using) the
removed forms.
The two removed forms are:
* {|$x| }
* |$x| => { }
|
|
This fixes the broken transformation of node inheritence. The cause
was that Resource::Type only handles an AST::Regexp as a special
case and expects the :parent option to be a String otherwise.
The transformer passed an ASTString (or other AST objects) which
caused the reported problem.
This fix also includes validation of the node parent (it was missing
in the 3x checker).
|
|
The API and Impl modules were an interesting idea that has just been
leading to confusion about where things live. Moving forward the public
vs. private distinction for API purposes should be handled with @api
annotations in documentation and clear responsibilities of classes and
modules.
|