class SilicaCore::CppGenerator
- SilicaCore::CppGenerator
- SilicaCore::Generator
- Reference
- Object
Defined in:
silica_core/cpp_generator.crConstant Summary
-
KEYWORDS =
["alignas", "alignof", "and", "and_eq", "asm", "atomic_cancel", "atomic_commit", "atomic_noexcept", "auto", "bitand", "bitor", "bool", "break", "case", "catch", "char", "char8_t", "char16_t", "char32_t", "class", "compl", "concept", "const", "consteval", "constexpr", "constinit", "const_cast", "continue", "co_await", "co_return", "co_yield", "decltype", "default", "delete", "do", "double", "dynamic_cast", "else", "enum", "explicit", "export", "extern", "false", "float", "for", "friend", "goto", "if", "inline", "int", "long", "mutable", "namespace", "new", "noexcept", "not", "not_eq", "nullptr", "operator", "or", "or_eq", "private", "protected", "public", "reflexpr", "register", "reinterpret_cast", "requires", "return", "short", "signed", "sizeof", "static", "static_assert", "static_cast", "struct", "switch", "synchronized", "template", "this", "thread_local", "throw", "true", "try", "typedef", "typeid", "typename", "union", "unsigned", "using", "virtual", "void", "volatile", "wchar_t", "while", "xor", "xor_eq"] of ::String
-
LINE_SEPARATOR =
';'
Constructors
Instance Method Summary
- #block(header : String, separator : Bool = false, &) : Generator
- #close
- #comment(line) : Generator
- #constant(type : String, name : String, value : String) : Generator
- #doc(& : DocGenerator -> ) : Generator
- #emit(line, no_sep = false, no_newline = false) : Generator
- #escape(str : String) : String
- #escape_keywords(str : String) : String
- #g_alias(name : String, tgt : String) : self
- #g_constant(type : String, name : String, value : String) : self
- #g_enum(name : String, type : String, &) : self
- #g_enum_member(name : String, value : String) : self
- #g_enum_member(name : String) : self
- #g_module(name : String, includes : Array(String) = [] of String, &) : self
- #g_struct(name : String, ancestors : Array(String) = [] of String, &) : self
- #generic(type : String, args : Array(String)) : String
- #generic(type : String, *args : String) : String
- #include_guard : Generator
- #instance(type : String, name : String, args : Array(String) = [] of String) : Generator
- #io : IO
- #namespace(name : String, &) : Generator
- #path(parts : Array(String)) : String
- #path(*parts : String) : String
- #require_file(name, local = false) : Generator
- #require_support : Generator
- #separator : Generator
Instance methods inherited from class SilicaCore::Generator
block(header : String, separator : Bool = false, &) : self
block,
close
close,
comment(line : String) : self
comment,
constant(type : String, name : String, value : String) : self
constant,
doc(& : DocGenerator -> ) : self
doc,
emit(line : String, no_sep = false, no_newline = false) : self
emit,
escape(str : String) : String
escape,
escape_keywords(s : String) : String
escape_keywords,
g_alias(name : String, tgt : String) : self
g_alias,
g_constant(type : String, name : String, value : String) : self
g_constant,
g_enum(name : String, type : String, &) : self
g_enum,
g_enum_member(name : String, value : String) : selfg_enum_member(name : String) : self g_enum_member, g_module(name : String, includes : Array(String) = [] of String, &) : self g_module, g_struct(name : String, ancestors : Array(String) = [] of String, &) : self g_struct, generate(&) generate, generic(type : String, args : Array(String)) : String
generic(type : String, *args : String) : String generic, include_guard include_guard, instance(type : String, name : String, args : Array(String) = [] of String) : self instance, namespace(name : String, &) : self namespace, path(parts : Array(String)) : String
path(*parts : String) : String path, require_file(name : String, local = false) : self require_file, require_support : self require_support, separator : self separator