Sha256: aa99e2f1866f2f43f84cf228f4252b169d344eb0dbb7a4d00772f13454adbc72

Contents?: true

Size: 1.95 KB

Versions: 1

Compression:

Stored size: 1.95 KB

Contents

module Vaporware
  VERSION: String
  # See the writing guide of rbs: https://github.com/ruby/rbs#guides
  class Error
  end
  class Compiler
    REGISTER: Array[String]
    # instance variables
    @_precompile: String
    @debug: bool
    @doned: Set[Symbol]
    @defined_methods: Set[Symbol]
    @defined_variables: Set[Symbol]
    @seq: Integer
    @main: bool
    @shared: bool

    # temporarily using untyped types since parser.gem's rbs information is unchecked.
    @ast: untyped

    # attr reader for instance variables
    def _precompile: -> String
    def ast: -> untyped # Parser::AST::Node
    def defined_methods: -> Set[Symbol]
    def defined_variables: -> Set[Symbol]
    def debug: -> bool
    def doned: -> Set[Symbol]
    def seq: -> Integer
    def shared: -> bool

    # class methods
    def self.compile: (String, ?compiler: String, ?dest: String, ?debug: bool, ?compiler_options: Array[String], ?shared: bool) -> nil
    def initialize: (String, ?_precompile: String, ?debug: bool, ?shared: bool) -> untyped

    # instance methods
    def compile: (?compiler: String, ?compiler_options: Array[String]) -> nil

    # instance private methods
    def already_build_methods?: -> bool
    def call_compiler: (?output: String, ?compiler: String, ?compiler_options: Array[String]) -> nil
    def compile_shared_option: () -> Array[String]
    def gen: (untyped, File, ?bool) -> nil
    def gen_args: (untyped, File) -> nil
    def gen_call_method: (untyped, File, bool) -> nil
    def gen_comp: (String, File) -> nil
    def gen_lvar: (untyped, File) -> nil
    def gen_method: (Symbol, untyped, File) -> nil
    def gen_define_method_prologue: (untyped, File) -> nil
    def gen_epilogue: (File) -> nil
    def gen_prologue: (untyped, File) -> nil
    def gen_prologue_methods: (File) -> nil
    def gen_ret: (File) -> nil
    def lvar_offset: (Symbol | nil) -> Integer
    def register_var_and_method: (untyped) -> nil
    def variable_or_method?: (Symbol) -> bool
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
vaporware-compiler-0.1.0 sig/vaporware.rbs