mirror of
https://github.com/Reuh/anselme.git
synced 2025-10-28 00:59:31 +00:00
Translation system first draft
This commit is contained in:
parent
ffadc0dd69
commit
c4636343b4
15 changed files with 215 additions and 18 deletions
16
parser/expression/primary/prefix/translatable.lua
Normal file
16
parser/expression/primary/prefix/translatable.lua
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
local prefix = require("parser.expression.primary.prefix.prefix")
|
||||
|
||||
local ast = require("ast")
|
||||
local Translatable = ast.Translatable
|
||||
|
||||
local operator_priority = require("common").operator_priority
|
||||
|
||||
return prefix {
|
||||
operator = "%",
|
||||
identifier = "%_",
|
||||
priority = operator_priority["%_"],
|
||||
|
||||
build_ast = function(self, right)
|
||||
return Translatable:new(right)
|
||||
end
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue