mirror of https://github.com/t1meshift/js.git
				
				
				
			Add ES2016 nodes
A whole standard just for power operator? ECMA must be kidding.master
							parent
							
								
									7a1eca4aca
								
							
						
					
					
						commit
						74d53ddf34
					
				|  | @ -12,7 +12,7 @@ The module lacks support of: | ||||||
|     * generators/yield statement |     * generators/yield statement | ||||||
|     * for-of statement |     * for-of statement | ||||||
|     * template literals |     * template literals | ||||||
|  * ES2016 features: |  * ES2017 features: | ||||||
|     * basically, all of them |     * basically, all of them | ||||||
| 
 | 
 | ||||||
| More about ESTree standard: | More about ESTree standard: | ||||||
|  | @ -91,6 +91,7 @@ class BinaryOperator(Enum): | ||||||
|     AND = "&" |     AND = "&" | ||||||
|     IN = "in" |     IN = "in" | ||||||
|     INSTANCEOF = "instanceof" |     INSTANCEOF = "instanceof" | ||||||
|  |     POW = "**" | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| class AssignmentOperator(Enum): | class AssignmentOperator(Enum): | ||||||
|  | @ -108,6 +109,7 @@ class AssignmentOperator(Enum): | ||||||
|     OR = "|=" |     OR = "|=" | ||||||
|     XOR = "^=" |     XOR = "^=" | ||||||
|     AND = "&=" |     AND = "&=" | ||||||
|  |     POW = "**=" | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| class LogicalOperator(Enum): | class LogicalOperator(Enum): | ||||||
|  | @ -959,6 +961,9 @@ InExpression = _generate_binary_expression(BinaryOperator.IN, """An "in" express | ||||||
| InstanceofExpression = _generate_binary_expression( | InstanceofExpression = _generate_binary_expression( | ||||||
|     BinaryOperator.INSTANCEOF, """An "instanceof" expression.""" |     BinaryOperator.INSTANCEOF, """An "instanceof" expression.""" | ||||||
| ) | ) | ||||||
|  | PowBinaryExpression = _generate_binary_expression( | ||||||
|  |     BinaryOperator.POW, """A power expression, e.g. ``2**3``.""" | ||||||
|  | ) | ||||||
| SimpleAssignExpression = _generate_assignment_expression( | SimpleAssignExpression = _generate_assignment_expression( | ||||||
|     AssignmentOperator.ASSIGN, """An assignment done with operator ``=`` expression.""" |     AssignmentOperator.ASSIGN, """An assignment done with operator ``=`` expression.""" | ||||||
| ) | ) | ||||||
|  | @ -1002,6 +1007,9 @@ AndAssignExpression = _generate_assignment_expression( | ||||||
|     AssignmentOperator.AND, |     AssignmentOperator.AND, | ||||||
|     """A "bit and" assignment done with operator ``&=`` expression.""", |     """A "bit and" assignment done with operator ``&=`` expression.""", | ||||||
| ) | ) | ||||||
|  | PowAssignExpression = _generate_assignment_expression( | ||||||
|  |     AssignmentOperator.POW, """A power assignment expression, e.g. ``x**=2``.""" | ||||||
|  | ) | ||||||
| OrLogicExpression = _generate_logical_expression( | OrLogicExpression = _generate_logical_expression( | ||||||
|     LogicalOperator.OR, """An "or" logical expression.""" |     LogicalOperator.OR, """An "or" logical expression.""" | ||||||
| ) | ) | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue