Module: StyleScript
- Defined in:
- lib/style-script.rb,
lib/style_script/lexer.rb,
lib/style_script/nodes.rb,
lib/style_script/scope.rb,
lib/style_script/value.rb,
lib/style_script/parser.rb,
lib/style_script/rewriter.rb,
lib/style_script/parse_error.rb,
lib/style_script/command_line.rb
Overview
Namespace for all StyleScript internal classes.
Defined Under Namespace
Classes: AccessorNode, ArrayNode, AssignNode, CallNode, ClosureNode, CodeNode, CommandLine, CommentNode, ExistenceNode, Expressions, ExtendsNode, ForNode, IfNode, IndexNode, Lexer, LiteralNode, Node, ObjectNode, OpNode, ParentheticalNode, ParseError, Parser, PushNode, RangeNode, ReturnNode, Rewriter, Scope, SliceNode, SplatNode, ThisNode, ThrowNode, TryNode, UntilNode, Value, ValueNode, WhileNode
Constant Summary collapse
- VERSION =
Keep in sync with the gemspec.
'1.0.2'
Class Method Summary collapse
-
.compile(script, options = {}) ⇒ Object
Compile a script (String or IO) to JavaScript.
Class Method Details
.compile(script, options = {}) ⇒ Object
Compile a script (String or IO) to JavaScript.
16 17 18 19 |
# File 'lib/style-script.rb', line 16 def self.compile(script, ={}) script = script.read if script.respond_to?(:read) Parser.new.parse(script).compile() end |