aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/syntax/SliceExpression.java
Commit message (Collapse)AuthorAge
* Introduce enum to quickly discriminate AST nodes.Gravatar laurentlb2017-08-25
| | | | | RELNOTES: None. PiperOrigin-RevId: 166370036
* Remove validate() methods in the AST, use a visitor instead.Gravatar laurentlb2017-08-18
| | | | | | | This is a simple refactoring, no change in behavior. RELNOTES: None. PiperOrigin-RevId: 165572028
* Delete Literal.javaGravatar laurentlb2017-08-17
| | | | | RELNOTES: None. PiperOrigin-RevId: 165422514
* Cleanup SkylarkListGravatar brandjon2017-08-04
| | | | | | | | | | | | | | | - Made abstract collection classes in SkylarkMutable more systematic. Added javadoc. Added a BaseMutableList class to factor out List stubs from SkylarkList. Alphabetized the methods to make it easier to verify that all overrides are covered. - Simplified MutableList constructors. Added MutableList#copyOf factory, and deprecated public access to the existing constructor to be more in line with Guava collections. Made Tuple#create private. - Made mutation methods for MutableList take in mutabilities rather than environments. For symmetry with the other mutators, pushed SkylarkList#set down to MutableList and moved the evaluation of its index to the caller. - Made SkylarkList#getSlice an abstract method that's implemented symmetrically in Tuple and MutableList -- instead of the bizarre thing it was doing before, where its return type was a List that sometimes got passed through SkylarkType.convertToSkylark in the caller. - Removed final modifier on methods where it wasn't obviously appropriate. Removed redundant super() calls. Renamed type variables to always be one letter, and to not reuse the instance's own type variable name from within static methods. RELNOTES: None PiperOrigin-RevId: 164257778
* 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
* Refactor PrinterGravatar vladmos2017-07-03
| | | | | | | It's now easier to customize Printer if in different situations objects should be printed differently. Also its API is cleaner now. Names of methods of SkylarkValue objects now reflect names of Skylark functions: SkylarkValue#repr and SkylarkPrintableValue#str. PiperOrigin-RevId: 160635154
* Add a pretty printer for Skylark ASTsGravatar brandjon2017-06-28
| | | | | | | This can be used to canonically compare ASTs for equality, e.g. in tests. RELNOTES: None PiperOrigin-RevId: 160283160
* Cleanup in error messages, try to improve consistency.Gravatar Laurent Le Brun2017-01-03
| | | | | | -- PiperOrigin-RevId: 143204724 MOS_MIGRATED_REVID=143204724
* Fix bugs in slicing with a negative strideGravatar Jon Brandvein2016-11-14
| | | | | | | | | | | | | | There was a crash when the starting point of a negative slice is larger than the list length. In addition, there was an incorrect result when the ending point of a negative slice is less than the list's length times -1. It would wrongly exclude the first element. RELNOTES: Fix slicing bug where "abc"[:-4:-1] would give wrong answer -- MOS_MIGRATED_REVID=138878716
* Index and slice calls are implemented as separate AST nodes rather than specialGravatar Vladimir Moskva2016-09-15
| | | | | | | function calls. -- MOS_MIGRATED_REVID=133262955
* Index and slice calls are implemented as separate AST nodes rather than specialGravatar Vladimir Moskva2016-09-15
function calls. -- MOS_MIGRATED_REVID=133259901