Skip to content
This repository has been archived by the owner on May 13, 2019. It is now read-only.

Commit

Permalink
Whitespace cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewd committed Oct 24, 2010
1 parent 79752e4 commit 3b9d818
Show file tree
Hide file tree
Showing 27 changed files with 3,044 additions and 3,044 deletions.
150 changes: 75 additions & 75 deletions convertor.rb
@@ -1,75 +1,75 @@
require 'syntax/convertors/abstract'

module Syntax
module Convertors
class Meta < Abstract
def type= new_type
@tokenizer.type = new_type
end
def type
@tokenizer.type
end
def virtual_root= new_value
@tokenizer.virtual_root = new_value
end
def virtual_root; @tokenizer.virtual_root; end
def follow_includes= new_value
@tokenizer.follow_includes = new_value
end
def swallow= new_value
@tokenizer.swallow = new_value
end
attr_accessor :start_group
def convert text, filename
@tokenizer.filename = filename
@tokenizer.start( text ) do |token|
start_group.call token.group, token
end
@tokenizer.step until @tokenizer.eos?
@tokenizer.finish
end
end
class CodeTree < Abstract
def type= new_type
@tokenizer.type = new_type
end
def type
@tokenizer.type
end
def virtual_root; @tokenizer.virtual_root; end
def virtual_root= new_value
@tokenizer.virtual_root = new_value
end
def follow_includes= new_value
@tokenizer.follow_includes = new_value
end
def swallow= new_value
@tokenizer.swallow = new_value
end
def convert text, filename
@text = text
@filename = filename
VbScriptRaccParser.new.run_parse self, :go
end
def go
@tokenizer.filename = @filename
@tokenizer.start( @text ) do |token|
if $DEBUG
if token.group.is_a? Symbol then
puts "Yielding :#{token.group} for '#{token}'"
else
puts "Yielding characters for '#{token}'"
end
end
yield [token.group, token] unless token.group == :token_sep
end
@tokenizer.step until @tokenizer.eos?
@tokenizer.finish
puts "Yielding final :fake_newline" if $DEBUG
yield [:fake_newline, nil]
puts "Yielding EOF" if $DEBUG
yield [false, false]
end
end
end
end
require 'syntax/convertors/abstract'

module Syntax
module Convertors
class Meta < Abstract
def type= new_type
@tokenizer.type = new_type
end
def type
@tokenizer.type
end
def virtual_root= new_value
@tokenizer.virtual_root = new_value
end
def virtual_root; @tokenizer.virtual_root; end
def follow_includes= new_value
@tokenizer.follow_includes = new_value
end
def swallow= new_value
@tokenizer.swallow = new_value
end
attr_accessor :start_group
def convert text, filename
@tokenizer.filename = filename
@tokenizer.start( text ) do |token|
start_group.call token.group, token
end
@tokenizer.step until @tokenizer.eos?
@tokenizer.finish
end
end
class CodeTree < Abstract
def type= new_type
@tokenizer.type = new_type
end
def type
@tokenizer.type
end
def virtual_root; @tokenizer.virtual_root; end
def virtual_root= new_value
@tokenizer.virtual_root = new_value
end
def follow_includes= new_value
@tokenizer.follow_includes = new_value
end
def swallow= new_value
@tokenizer.swallow = new_value
end
def convert text, filename
@text = text
@filename = filename
VbScriptRaccParser.new.run_parse self, :go
end
def go
@tokenizer.filename = @filename
@tokenizer.start( @text ) do |token|
if $DEBUG
if token.group.is_a? Symbol then
puts "Yielding :#{token.group} for '#{token}'"
else
puts "Yielding characters for '#{token}'"
end
end
yield [token.group, token] unless token.group == :token_sep
end
@tokenizer.step until @tokenizer.eos?
@tokenizer.finish
puts "Yielding final :fake_newline" if $DEBUG
yield [:fake_newline, nil]
puts "Yielding EOF" if $DEBUG
yield [false, false]
end
end
end
end
30 changes: 15 additions & 15 deletions foo.asp
@@ -1,15 +1,15 @@
<%
Dim o
Set o = Server.CreateObject("Scripting.Dictionary")
o.Add "foo", "bar"
o.Add "baz", "quux"
Response.Write o("foo") & vbCrLf & vbCrLf
o("foo") = o("baz")
Response.Write o("foo")
%>
<%
Dim o
Set o = Server.CreateObject("Scripting.Dictionary")
o.Add "foo", "bar"
o.Add "baz", "quux"
Response.Write o("foo") & vbCrLf & vbCrLf
o("foo") = o("baz")
Response.Write o("foo")
%>

0 comments on commit 3b9d818

Please sign in to comment.