examples: fix left/right arrows in examples/term.ui/text_editor.v
parent
c7587c0760
commit
639061be6c
|
@ -155,8 +155,6 @@ pub enum Modifiers {
|
|||
alt
|
||||
}
|
||||
|
||||
[inline] pub fn (m &Modifiers) is_empty() bool { return int(m) == 0 }
|
||||
|
||||
pub struct Event {
|
||||
pub:
|
||||
typ EventType
|
||||
|
|
|
@ -2204,7 +2204,8 @@ fn (mut p Parser) enum_decl() ast.EnumDecl {
|
|||
pubfn := if p.mod == 'main' { 'fn' } else { 'pub fn' }
|
||||
p.scanner.codegen('
|
||||
//
|
||||
[inline] $pubfn ( e &$enum_name) has(flag $enum_name) bool { return (int(*e) & (int(flag))) != 0 }
|
||||
[inline] $pubfn ( e &$enum_name) is_empty() bool { return int(*e) == 0 }
|
||||
[inline] $pubfn ( e &$enum_name) has(flag $enum_name) bool { return (int(*e) & (int(flag))) != 0 }
|
||||
[inline] $pubfn (mut e $enum_name) set(flag $enum_name) { unsafe{ *e = ${enum_name}(int(*e) | (int(flag))) } }
|
||||
[inline] $pubfn (mut e $enum_name) clear(flag $enum_name) { unsafe{ *e = ${enum_name}(int(*e) & ~(int(flag))) } }
|
||||
[inline] $pubfn (mut e $enum_name) toggle(flag $enum_name) { unsafe{ *e = ${enum_name}(int(*e) ^ (int(flag))) } }
|
||||
|
|
Loading…
Reference in New Issue