aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/syntax/SyntaxTreeVisitor.java
Commit message (Collapse)AuthorAge
* Misc cleanups of AST node APIGravatar brandjon2017-07-12
| | | | | | | | | - changed field names and a couple accessors to consistently use full words ("statement" instead of "stmt") - applied several local analyzers (from IntelliJ) to remove redundant modifiers, unnecessary explicit types (yay Java 8), etc. RELNOTES: None PiperOrigin-RevId: 161551096
* Turn unary minus into a proper AST nodeGravatar brandjon2017-06-28
| | | | | | | This unifies unary minus with NotExpression, and moves the minus logic from a fake builtin function into the interpreter proper. RELNOTES: None PiperOrigin-RevId: 160266266
* Add a new AST node for augmented assignments in SkylarkGravatar Vladimir Moskva2016-12-19
| | | | | | -- PiperOrigin-RevId: 142438943 MOS_MIGRATED_REVID=142438943
* Index and slice calls are implemented as separate AST nodes rather than specialGravatar Vladimir Moskva2016-09-15
| | | | | | | function calls. -- MOS_MIGRATED_REVID=133259901
* Rationalize copyright headersGravatar Damien Martin-Guillerez2015-09-25
| | | | | | | | | | | The headers were modified with `find . -type f -exec 'sed' '-Ei' 's|Copyright 201([45]) Google|Copyright 201\1 The Bazel Authors|' '{}' ';'` And manual edit for not Google owned copyright. Because of the nature of ijar, I did not modified the header of file owned by Alan Donovan. The list of authors were extracted from the git log. It is missing older Google contributors that can be added on-demand. -- MOS_MIGRATED_REVID=103938715
* Skylark: Unified ListComprehension and DictComprehension.Gravatar Florian Weikert2015-09-21
| | | | | | | As a result, complex dict comprehensions (nested + with conditions) can be used. -- MOS_MIGRATED_REVID=103374493
* Fix and test SyntaxTreeVisitorGravatar Laurent Le Brun2015-09-15
| | | | | -- MOS_MIGRATED_REVID=103003770
* Keep function parameters in the AST.Gravatar Laurent Le Brun2015-09-04
| | | | | -- MOS_MIGRATED_REVID=102330569
* Fix a bug in SyntaxTreeVisitor to handle return statements.Gravatar Laurent Le Brun2015-09-03
| | | | | -- MOS_MIGRATED_REVID=102237430
* Renamed Ident to Identifier, added some helper methods and refactored two ↵Gravatar Florian Weikert2015-07-23
| | | | | | | methods. -- MOS_MIGRATED_REVID=98922811
* Fix SyntaxTreeVisitor for LoadStatement.Gravatar Laurent Le Brun2015-06-19
| | | | | | | Also, some cleanup in the code - #codehealth -- MOS_MIGRATED_REVID=96315466
* Build language: Fix evaluation of nested list comprehensions.Gravatar Laurent Le Brun2015-05-18
| | | | | -- MOS_MIGRATED_REVID=93869549
* Skylark: Use LValue class in loops and comprehensions.Gravatar Laurent Le Brun2015-03-20
| | | | | -- MOS_MIGRATED_REVID=89020190
* Refactoring: Introduce a new class LValue.Gravatar Laurent Le Brun2015-03-20
| | | | | | | | | | | | | | | | | | | | | | | | | This CL is just moving code from AssignmentStatement to a new class. The goal is to share code dealing with LValues. LValues can be found here: - lvalue = 2 - [for lvalue in exp] - {a: b for lvalue in exp] - for lvalue in exp: pass The LValue itself can have different forms: - a - a, b - a[0] - a, (b, c) - [a[0], (b, c)] - a[1:5] Although we may not handle everything, we need to make sure that the same things can be used in variable assignment and in for loops. -- MOS_MIGRATED_REVID=89015483
* Implement ConditionalExpressionGravatar Francois-Rene Rideau2015-03-13
| | | | | | | Also add tests. -- MOS_MIGRATED_REVID=88474801
* Introduce first class function signatures; make the parser use them.Gravatar Francois-Rene Rideau2015-02-19
| | | | | | | | | | | | | | | | | | | This is the first meaty cl in a series to refactor the Skylark function call protocol. 1- We introduce a first-class notion of FunctionSignature, that supports positional and named-only arguments, mandatory and optional, default values, type-checking, *stararg and **kwarg; 2- To keep things clean, we distinguish two different kinds of Argument's: Argument.Passed that appears in function calls, and Parameter, that appears in function definitions. 3- We refactor the Parser so it uses this infrastructure, and make minimal changes to MixedModeFunction so that it works with it (but don't actually implement *starparam and **kwparam yet). 4- As we modify FuncallExpression, we ensure that the args and kwargs arguments it passes to the underlying function are immutable, as a prerequisite to upcoming implementation of *starparam and **kwparam as being provided directly from a skylark list or dict. Further changes under review will take advantage of this FunctionSignature to redo all our function call protocol, to be used uniformly for both UserDefinedFunction's and builtin function. The result will be a simpler inheritance model, with better type-checking, builtin functions that are both simpler and better documented, and many redundant competing functionality-limited codepaths being merged and replaced by something better. NB: The changes to MixedModeFunction, SkylarkFunction and MethodLibrary are temporary hacks to be done away with in an upcoming CL. The rest is the actual changes. -- MOS_MIGRATED_REVID=86704072
* Update from Google.Gravatar Han-Wen Nienhuys2015-02-25
-- MOE_MIGRATED_REVID=85702957