mirror of
https://github.com/leafo/moonscript.git
synced 2024-11-22 02:44:23 +00:00
renamed line.moon to statement.moon
This commit is contained in:
parent
5d9851b8cd
commit
44167c327a
@ -2,7 +2,7 @@ module("moonscript.compile", package.seeall)
|
|||||||
local util = require("moonscript.util")
|
local util = require("moonscript.util")
|
||||||
local dump = require("moonscript.dump")
|
local dump = require("moonscript.dump")
|
||||||
require("moonscript.compile.format")
|
require("moonscript.compile.format")
|
||||||
require("moonscript.compile.line")
|
require("moonscript.compile.statement")
|
||||||
require("moonscript.compile.value")
|
require("moonscript.compile.value")
|
||||||
local transform = require("moonscript.transform")
|
local transform = require("moonscript.transform")
|
||||||
local NameProxy = transform.NameProxy
|
local NameProxy = transform.NameProxy
|
||||||
@ -89,8 +89,7 @@ Line = (function()
|
|||||||
_base_0.__class = _class_0
|
_base_0.__class = _class_0
|
||||||
return _class_0
|
return _class_0
|
||||||
end)()
|
end)()
|
||||||
local Block_
|
Block = (function()
|
||||||
Block_ = (function()
|
|
||||||
local _parent_0 = nil
|
local _parent_0 = nil
|
||||||
local _base_0 = {
|
local _base_0 = {
|
||||||
header = "do",
|
header = "do",
|
||||||
@ -425,7 +424,7 @@ Block_ = (function()
|
|||||||
end)()
|
end)()
|
||||||
local RootBlock
|
local RootBlock
|
||||||
RootBlock = (function()
|
RootBlock = (function()
|
||||||
local _parent_0 = Block_
|
local _parent_0 = Block
|
||||||
local _base_0 = {
|
local _base_0 = {
|
||||||
render = function(self)
|
render = function(self)
|
||||||
self:_insert_breaks()
|
self:_insert_breaks()
|
||||||
@ -453,7 +452,6 @@ RootBlock = (function()
|
|||||||
_base_0.__class = _class_0
|
_base_0.__class = _class_0
|
||||||
return _class_0
|
return _class_0
|
||||||
end)()
|
end)()
|
||||||
Block = Block_
|
|
||||||
format_error = function(msg, pos, file_str)
|
format_error = function(msg, pos, file_str)
|
||||||
local line = pos_to_line(file_str, pos)
|
local line = pos_to_line(file_str, pos)
|
||||||
local line_str
|
local line_str
|
||||||
|
@ -4,7 +4,7 @@ util = require "moonscript.util"
|
|||||||
dump = require "moonscript.dump"
|
dump = require "moonscript.dump"
|
||||||
|
|
||||||
require "moonscript.compile.format"
|
require "moonscript.compile.format"
|
||||||
require "moonscript.compile.line"
|
require "moonscript.compile.statement"
|
||||||
require "moonscript.compile.value"
|
require "moonscript.compile.value"
|
||||||
|
|
||||||
transform = require "moonscript.transform"
|
transform = require "moonscript.transform"
|
||||||
@ -48,7 +48,7 @@ class Line
|
|||||||
c
|
c
|
||||||
concat buff
|
concat buff
|
||||||
|
|
||||||
class Block_
|
class Block
|
||||||
header: "do"
|
header: "do"
|
||||||
footer: "end"
|
footer: "end"
|
||||||
|
|
||||||
@ -263,13 +263,11 @@ class Block_
|
|||||||
@stm stm for stm in *stms
|
@stm stm for stm in *stms
|
||||||
nil
|
nil
|
||||||
|
|
||||||
class RootBlock extends Block_
|
class RootBlock extends Block
|
||||||
render: =>
|
render: =>
|
||||||
@_insert_breaks!
|
@_insert_breaks!
|
||||||
concat @_lines, "\n"
|
concat @_lines, "\n"
|
||||||
|
|
||||||
Block = Block_
|
|
||||||
|
|
||||||
format_error = (msg, pos, file_str) ->
|
format_error = (msg, pos, file_str) ->
|
||||||
line = pos_to_line file_str, pos
|
line = pos_to_line file_str, pos
|
||||||
line_str, line = get_closest_line file_str, line
|
line_str, line = get_closest_line file_str, line
|
||||||
|
Loading…
Reference in New Issue
Block a user