This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
proc primary(p: var TParser, mode: TPrimaryMode): PNode = | |
if isOperator(p.tok): | |
let isSigil = isSigilLike(p.tok) | |
result = newNodeP(nkPrefix, p) | |
var a = newIdentNodeP(p.tok.ident, p) | |
addSon(result, a) | |
getTok(p) | |
optInd(p, a) | |
if isSigil: | |
#XXX prefix operators |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
macro Λ*(b: expr): expr {.immediate.} = | |
echo b.tree–repr | |
echo " < - - - >" | |
echo b.to–str–lit() | |
var par: NimNode | |
var params: seq[NimNode] = @[new–IdentNode("T")] | |
par = new–NimNode(nnk–IdentDefs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type | |
A = ref A_obj | |
A_obj = object {.inheritable} | |
forward_deps: seq[A] | |
B[T] = ref B_obj[T] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
abstract class QamAbstract | |
def initialize() | |
@forward–deps = [] of QamAbstract | |
end | |
end | |
class Qam(T) < QamAbstract | |
def initialize() | |
super() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(master) crystal-dev-fork $ make | |
CRYSTAL_CONFIG_PATH=`pwd`/src ./bin/crystal build -o .build/crystal src/compiler/crystal.cr | |
Using compiled compiler at .build/crystal | |
/home/oscar/1GTD/project-support/crystal/crystal-dev-fork/.crystal/home/oscar/1GTD/project-support/crystal/crystal-dev-fork/src/ecr/process.cr/main.o: In function `*Fiber::new<&( -> Void)>:Fiber': | |
main_module:(.text+0xf42): undefined reference to `co_set_data' | |
/home/oscar/1GTD/project-support/crystal/crystal-dev-fork/.crystal/home/oscar/1GTD/project-support/crystal/crystal-dev-fork/src/ecr/process.cr/main.o: In function `*Fiber#resume<Fiber>:Void': | |
main_module:(.text+0x1080): undefined reference to `co_get_data' | |
/home/oscar/1GTD/project-support/crystal/crystal-dev-fork/.crystal/home/oscar/1GTD/project-support/crystal/crystal-dev-fork/src/ecr/process.cr/main.o: In function `*FileDescriptorIO#unbuffered_write<FileDescriptorIO, Slice(UInt8), Int32>:Int32': | |
main_module:(.text+0x1326): undefined reference to `co_get_data' | |
/home/oscar/1GTD/project-su |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def transform(node : For) | |
block_args = [] of Var | |
method_name :: String | |
node.vars.each do |v| | |
block_args << v.clone # tries cloning if there are any weird node to node ties | |
end | |
if node.vars.length == 1 | |
method_name = "each" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Error in ./src/quate/core-embryo.cr:530: no overload matches 'Que::Add(Float64, Float64)#/' with types Float64 | |
Overloads are: | |
- Que::Add(Float64, Float64)#/(other : Float32) | |
- Que::Add(Float64, Float64)#/(other : Float64) | |
- Que::Add(Float64, Float64)#/(other : Qam(T)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "../crystal/**" | |
require "../onyx/**" | |
macro dump_prop(name) | |
io << "\n" << " " * (depth+1) << {{name.stringify}}[1..-1].cyan << ": " | |
case (v = {{name}}) | |
when Nil then io << "nil" | |
else v.dump_inspect(io, terse_output, depth + 1) |