Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 373
- Log:
Initial import of Radiant 0.9.1, which is now packaged as a gem. This is an
import of the tagged 0.9.1 source checked out from GitHub, which isn't quite
the same as the gem distribution - but it doesn't seem to be available in an
archived form and the installed gem already has modifications, so this is
the closest I can get.
- Author:
- rool
- Date:
- Mon Mar 21 13:40:05 +0000 2011
- Size:
- 1244 Bytes
1 | module Sass::Script |
2 | # A SassScript parse node representing a unary operation, |
3 | # such as `-!b` or `not true`. |
4 | # |
5 | # Currently only `-`, `/`, and `not` are unary operators. |
6 | class UnaryOperation < Node |
7 | # @param operand [Script::Node] The parse-tree node |
8 | # for the object of the operator |
9 | # @param operator [Symbol] The operator to perform |
10 | def initialize(operand, operator) |
11 | @operand = operand |
12 | @operator = operator |
13 | end |
14 | |
15 | # @return [String] A human-readable s-expression representation of the operation |
16 | def inspect |
17 | "(#{@operator.inspect} #{@operand.inspect})" |
18 | end |
19 | |
20 | # Evaluates the operation. |
21 | # |
22 | # @param environment [Sass::Environment] The environment in which to evaluate the SassScript |
23 | # @return [Literal] The SassScript object that is the value of the operation |
24 | # @raise [Sass::SyntaxError] if the operation is undefined for the operand |
25 | def perform(environment) |
26 | operator = "unary_#{@operator}" |
27 | literal = @operand.perform(environment) |
28 | literal.send(operator) |
29 | rescue NoMethodError => e |
30 | raise e unless e.name.to_s == operator.to_s |
31 | raise Sass::SyntaxError.new("Undefined unary operation: \"#{@operator} #{literal}\".") |
32 | end |
33 | end |
34 | end |