1
0
Fork 0
mirror of https://github.com/notwa/lips synced 2024-11-14 09:09:02 -08:00

redo internal paths/requires

This commit is contained in:
Connor Olding 2016-04-14 07:33:33 -07:00
parent 3290735c8f
commit 071169df48
9 changed files with 34 additions and 25 deletions

View file

@ -14,8 +14,9 @@ Even this README is incomplete.
Copy the lips directory to somewhere Lua's `package.path` can find it.
If you're using it locally, you will need to write something like:
```
package.path = package.path..";./?/init.lua"
package.path = package.path.."?/init.lua"
```
or `require "lips.init"` directly.
You can then use it as such:
[example.lua][elua] — [example.asm][easm]

View file

@ -2,8 +2,9 @@ local floor = math.floor
local format = string.format
local insert = table.insert
local data = require "lips.data"
local util = require "lips.util"
local path = string.gsub(..., "[^.]+$", "")
local data = require(path.."data")
local util = require(path.."util")
local bitrange = util.bitrange

View file

@ -4,8 +4,9 @@ local find = string.find
local format = string.format
local insert = table.insert
local data = require "lips.data"
local util = require "lips.util"
local path = string.gsub(..., "[^.]+$", "")
local data = require(path.."data")
local util = require(path.."util")
local simple_escapes = {
['0'] = 0x00,

View file

@ -1,9 +1,10 @@
local format = string.format
local insert = table.insert
local data = require "lips.data"
local util = require "lips.util"
local Token = require "lips.Token"
local path = string.gsub(..., "[^.]+$", "")
local data = require(path.."data")
local util = require(path.."util")
local Token = require(path.."Token")
local arg_types = {
NUM = true,

View file

@ -1,13 +1,14 @@
local insert = table.insert
local data = require "lips.data"
local util = require "lips.util"
local overrides = require "lips.overrides"
local Token = require "lips.Token"
local Lexer = require "lips.Lexer"
local Dumper = require "lips.Dumper"
local Muncher = require "lips.Muncher"
local Preproc = require "lips.Preproc"
local path = string.gsub(..., "[^.]+$", "")
local data = require(path.."data")
local util = require(path.."util")
local overrides = require(path.."overrides")
local Token = require(path.."Token")
local Lexer = require(path.."Lexer")
local Dumper = require(path.."Dumper")
local Muncher = require(path.."Muncher")
local Preproc = require(path.."Preproc")
local Parser = util.Class(Muncher)
function Parser:init(writer, fn, options)

View file

@ -1,9 +1,10 @@
local insert = table.insert
local data = require "lips.data"
local util = require "lips.util"
local Muncher = require "lips.Muncher"
local Token = require "lips.Token"
local path = string.gsub(..., "[^.]+$", "")
local data = require(path.."data")
local util = require(path.."util")
local Muncher = require(path.."Muncher")
local Token = require(path.."Token")
local abs = math.abs

View file

@ -1,4 +1,5 @@
local util = require "lips.util"
local path = string.gsub(..., "[^.]+$", "")
local util = require(path.."util")
local Token = util.Class()
function Token:init(...)

View file

@ -10,8 +10,9 @@ local lips = {
]],
}
local util = require "lips.util"
local Parser = require "lips.Parser"
local path = string.gsub(..., "%.init$", "").."."
local util = require(path.."util")
local Parser = require(path.."Parser")
function lips.word_writer()
local buff = {}

View file

@ -1,7 +1,8 @@
local insert = table.insert
local data = require "lips.data"
local util = require "lips.util"
local path = string.gsub(..., "[^.]+$", "")
local data = require(path.."data")
local util = require(path.."util")
local instructions = data.instructions