Skip to content

Instantly share code, notes, and snippets.

@straight-shoota
Last active April 14, 2020 23:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save straight-shoota/d6b783dd4c973712aa6a2183153fd391 to your computer and use it in GitHub Desktop.
Save straight-shoota/d6b783dd4c973712aa6a2183153fd391 to your computer and use it in GitHub Desktop.
Crystal::API
require "json"
module Crystal::Docs
record Program,
project_info : ProjectInfo,
constants : Array(Constant),
types : Array(Type),
methods : Array(Method),
macros : Array(Macro)
record Location,
filename : String,
line : Int32,
line_end : Int32?
record Type,
name : String,
namespace : TypeRef,
kind : String,
abstract : Bool,
ancestors : Array(TypeRef),
included_modules : Array(TypeRef),
extended_modules : Array(TypeRef),
subclasses : Array(TypeRef),
including_types : Array(TypeRef),
locations : Array(Location),
doc : String?,
constants : Array(Constant),
types : Array(Type),
methods : Array(Method),
constructors : Array(Method),
instance_methods : Array(Method),
macros : Array(Macro)
record TypeRef,
name : String,
kind : String,
namespace : TypeRef
record Constant,
name : String,
namespace : TypeRef,
value : String,
doc : String?
record Method,
name : String,
namespace : TypeRef,
doc : String?,
location : Location,
annotations : Array(Annotation),
args : Array(Argument),
double_splat : Argument?,
splat_index : Int32?,
yields : Int32?,
block_arg : Argument?,
return_type : String,
visibility : String,
free_vars : Array(String),
body : String
record Annotation,
name : String,
arguments : Array(String),
kwargs : Hash(String, String)
record Argument,
name : String,
default_value : String?,
external_name : String?,
restriction : String?
record Macro,
name : String,
namespace : TypeRef,
doc : String?,
location : Location,
annotations : Array(Annotation),
args : Array(Argument),
double_splat : Argument?,
splat_index : Int32?,
yields : Int32?,
block_arg : Argument?,
visibility : String,
body : String
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment