diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..082b194 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "makefile.configureOnOpen": false +} \ No newline at end of file diff --git a/pkg/deltanet/node.go b/pkg/deltanet/node.go index 91a77d0..bdf99cd 100644 --- a/pkg/deltanet/node.go +++ b/pkg/deltanet/node.go @@ -1,7 +1,5 @@ package deltanet -/** ------------------------------------------------------------------------- */ - // A connection between exactly two nodes in a graph. type Edge struct { A, B Node @@ -28,8 +26,6 @@ func (e Edge) IsPrincipleEdge() bool { return e.A.GetMainPort() == e && e.B.GetMainPort() == e } -/** ------------------------------------------------------------------------- */ - type Node interface { // Returns the principle port that the node is attached to. GetMainPort() Edge @@ -42,8 +38,6 @@ type Node interface { GetLabel() string } -/** ------------------------------------------------------------------------- */ - type EraserNode struct { Main Edge } @@ -52,8 +46,6 @@ func (n EraserNode) GetLabel() string { return "Ⓧ" } func (n EraserNode) GetMainPort() Edge { return n.Main } func (n EraserNode) GetAuxPorts() []Edge { return []Edge{} } -/** ------------------------------------------------------------------------- */ - type ReplicatorNode struct { Main Edge Level uint @@ -68,8 +60,6 @@ func (n ReplicatorNode) GetAuxPorts() []Edge { return n.Aux } // Returns the level of the replicator node. func (n ReplicatorNode) GetLevel() uint { return n.Level } -/** ------------------------------------------------------------------------- */ - type FanNode struct { Label string Main Edge @@ -80,8 +70,6 @@ func (n FanNode) GetLabel() string { return n.Label } func (n FanNode) GetMainPort() Edge { return n.Main } func (n FanNode) GetAuxPorts() []Edge { return []Edge{n.Left, n.Right} } -/** ------------------------------------------------------------------------- */ - type TerminalNode struct { Label string Main Edge @@ -90,5 +78,3 @@ type TerminalNode struct { func (n TerminalNode) GetLabel() string { return n.Label } func (n TerminalNode) GetMainPort() Edge { return n.Main } func (n TerminalNode) GetAuxPorts() []Edge { return []Edge{} } - -/** ------------------------------------------------------------------------- */ diff --git a/pkg/lambda/expression.go b/pkg/lambda/expression.go index e2814b2..e96090d 100644 --- a/pkg/lambda/expression.go +++ b/pkg/lambda/expression.go @@ -5,8 +5,6 @@ type Expression interface { Copy() Expression } -/** ------------------------------------------------------------------------- */ - type Abstraction struct { Parameter string Body Expression @@ -24,8 +22,6 @@ func NewAbstraction(parameter string, body Expression) *Abstraction { return &Abstraction{Parameter: parameter, Body: body} } -/** ------------------------------------------------------------------------- */ - type Application struct { Abstraction Expression Argument Expression @@ -43,8 +39,6 @@ func NewApplication(function Expression, argument Expression) *Application { return &Application{Abstraction: function, Argument: argument} } -/** ------------------------------------------------------------------------- */ - type Variable struct { Value string } @@ -61,8 +55,6 @@ func NewVariable(name string) *Variable { return &Variable{Value: name} } -/** ------------------------------------------------------------------------- */ - type Visitor interface { VisitAbstraction(*Abstraction) VisitApplication(*Application) diff --git a/pkg/saccharine/expression.go b/pkg/saccharine/expression.go index 80c8f1b..fb4e7f8 100644 --- a/pkg/saccharine/expression.go +++ b/pkg/saccharine/expression.go @@ -4,8 +4,6 @@ type Expression interface { IsExpression() } -/** ------------------------------------------------------------------------- */ - type Abstraction struct { Parameters []string Body Expression @@ -30,8 +28,6 @@ func (Application) IsExpression() {} func (Atom) IsExpression() {} func (Clause) IsExpression() {} -/** ------------------------------------------------------------------------- */ - func NewAbstraction(parameter []string, body Expression) *Abstraction { return &Abstraction{Parameters: parameter, Body: body} } diff --git a/pkg/saccharine/statement.go b/pkg/saccharine/statement.go index 1d0dd15..2a5b938 100644 --- a/pkg/saccharine/statement.go +++ b/pkg/saccharine/statement.go @@ -4,8 +4,6 @@ type Statement interface { IsStatement() } -/** ------------------------------------------------------------------------- */ - type LetStatement struct { Name string Parameters []string @@ -19,8 +17,6 @@ type DeclareStatement struct { func (LetStatement) IsStatement() {} func (DeclareStatement) IsStatement() {} -/** ------------------------------------------------------------------------- */ - func NewLet(name string, parameters []string, body Expression) *LetStatement { return &LetStatement{Name: name, Parameters: parameters, Body: body} }