@WilliamDeVore/

ValidGreenSoftwaresuite

Julia

No description

fork
loading
Files
  • main.jl

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.022565620082965365","path":"main.jl","file":{"path":"main.jl","content":{"asEncoding":{"base64":"bW9kdWxlIFJhbmdlcgogIG1vZHVsZSBOb2RlcwogICAgZnVuY3Rpb24gdHJhbnNpdGlvbiBlbmQKCiAgICAjIFNpbXBsZSBkZW1vIG5vZGUgZm9yIGV4YW1wbGUgLS0tLS0tLS0tLQogICAgYWJzdHJhY3QgdHlwZSBBYnN0cmFjdE5vZGUgZW5kCgogICAgbXV0YWJsZSBzdHJ1Y3QgTm9kZSA8OiBBYnN0cmFjdE5vZGUKICAgICAgeDo6RmxvYXQ2NAogICAgZW5kCgogICAgY3Jvc3Nub2RlID0gTm9kZSgxLjApCiAgICAjIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KCiAgICBmdW5jdGlvbiB2aXNpdCgpCiAgICAgIHRyYW5zaXRpb24oY3Jvc3Nub2RlKQogICAgZW5kCiAgZW5kCmVuZAoKIyBEZW1vIGVuZ2luZQptb2R1bGUgRW5naW5lCiAgdXNpbmcgLi5SYW5nZXIuTm9kZXM6CiAgICB2aXNpdAogICAgCiAgZnVuY3Rpb24gcnVuKCkKICAgIHZpc2l0KCkKICBlbmQKZW5kCgojIC0tLS0tLS0tLS0tLS0tLS0tLQp1c2luZyAuUmFuZ2VyLk5vZGVzOgogIEFic3RyYWN0Tm9kZSwgTm9kZQoKaW1wb3J0IC5SYW5nZXIuTm9kZXM6CiAgdHJhbnNpdGlvbgoKZnVuY3Rpb24gdHJhbnNpdGlvbihub2RlOjpBYnN0cmFjdE5vZGUpCiAgcHJpbnRsbigiYWJzdHJhY3Qgbm9kZSB0cmFuc2l0aW9uIikKZW5kCgpmdW5jdGlvbiB0cmFuc2l0aW9uKG5vZGU6Ok5vZGUpCiAgcHJpbnRsbigibm9kZSB0cmFuc2l0aW9uIikKZW5kCgojIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KdXNpbmcgLkVuZ2luZToKICBydW4KICAKZnVuY3Rpb24gZ28oKQogIHJ1bigpCmVuZAogIApnbygp"},"asBuffer":null},"loaded":true}}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
module Ranger
  module Nodes
    function transition end

    # Simple demo node for example ----------
    abstract type AbstractNode end

    mutable struct Node <: AbstractNode
      x::Float64
    end

    crossnode = Node(1.0)
    # -------------------------------------

    function visit()
      transition(crossnode)
    end
  end
end

# Demo engine
module Engine
  using ..Ranger.Nodes:
    visit
    
  function run()
    visit()
  end
end

# ------------------
using .Ranger.Nodes:
  AbstractNode, Node

import .Ranger.Nodes:
  transition

function transition(node::AbstractNode)
  println("abstract node transition")
end

function transition(node::Node)
  println("node transition")
end

# -------------------------
using .Engine:
  run
  
function go()
  run()
end
  
go()