update syntax plans

This commit is contained in:
2026-05-01 13:04:06 +01:00
parent 0b3470d483
commit 8ef525c8f5
4 changed files with 179 additions and 142 deletions
+40
View File
@@ -0,0 +1,40 @@
class Query
def initialize(type, value, capturing)
@type = type
@value = value
@query_l = nil
@query_r = nil
@capturing = capturing
end
def &(other)
@query_l = self
@query_r = other
self.type = :and
self
end
def |(other)
@query_l = self
@query_r = other
self.type = :or
self
end
end
def tag(name, capturing = false)
return Query.new(:tag, name, capturing)
end
def component(name, capturing = false)
return Query.new(:component, name, capturing)
end
def name(name, capturing = false)
return Query.new(:name, name, capturing)
end
def anti(query)
query.type = :"not_#{query.type}"
query
end
+1
View File
@@ -398,6 +398,7 @@ bool Window::poll(Event &event) {
break;
case SDL_EVENT_KEY_DOWN:
#warning This is a bit of a hack to prevent key down/up events from being generated when text input is active on certian keys, but this list is not enough, need to look more into it
if (text_input_active && sdl_event.key.key > '0' && sdl_event.key.key < 'z')
return false;
event.type = Event::KEY_DOWN;