chore: Makefile improvements and cleanup #2

Closed
mvhutz wants to merge 16 commits from chore/makefile-improvements into main
5 changed files with 3 additions and 30 deletions
Showing only changes of commit b2b2655c1e - Show all commits

3
.vscode/settings.json vendored Normal file
View File

@@ -0,0 +1,3 @@
{
"makefile.configureOnOpen": false
}

View File

@@ -1,7 +1,5 @@
package deltanet package deltanet
/** ------------------------------------------------------------------------- */
// A connection between exactly two nodes in a graph. // A connection between exactly two nodes in a graph.
type Edge struct { type Edge struct {
A, B Node A, B Node
@@ -28,8 +26,6 @@ func (e Edge) IsPrincipleEdge() bool {
return e.A.GetMainPort() == e && e.B.GetMainPort() == e return e.A.GetMainPort() == e && e.B.GetMainPort() == e
} }
/** ------------------------------------------------------------------------- */
type Node interface { type Node interface {
// Returns the principle port that the node is attached to. // Returns the principle port that the node is attached to.
GetMainPort() Edge GetMainPort() Edge
@@ -42,8 +38,6 @@ type Node interface {
GetLabel() string GetLabel() string
} }
/** ------------------------------------------------------------------------- */
type EraserNode struct { type EraserNode struct {
Main Edge Main Edge
} }
@@ -52,8 +46,6 @@ func (n EraserNode) GetLabel() string { return "Ⓧ" }
func (n EraserNode) GetMainPort() Edge { return n.Main } func (n EraserNode) GetMainPort() Edge { return n.Main }
func (n EraserNode) GetAuxPorts() []Edge { return []Edge{} } func (n EraserNode) GetAuxPorts() []Edge { return []Edge{} }
/** ------------------------------------------------------------------------- */
type ReplicatorNode struct { type ReplicatorNode struct {
Main Edge Main Edge
Level uint Level uint
@@ -68,8 +60,6 @@ func (n ReplicatorNode) GetAuxPorts() []Edge { return n.Aux }
// Returns the level of the replicator node. // Returns the level of the replicator node.
func (n ReplicatorNode) GetLevel() uint { return n.Level } func (n ReplicatorNode) GetLevel() uint { return n.Level }
/** ------------------------------------------------------------------------- */
type FanNode struct { type FanNode struct {
Label string Label string
Main Edge 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) GetMainPort() Edge { return n.Main }
func (n FanNode) GetAuxPorts() []Edge { return []Edge{n.Left, n.Right} } func (n FanNode) GetAuxPorts() []Edge { return []Edge{n.Left, n.Right} }
/** ------------------------------------------------------------------------- */
type TerminalNode struct { type TerminalNode struct {
Label string Label string
Main Edge Main Edge
@@ -90,5 +78,3 @@ type TerminalNode struct {
func (n TerminalNode) GetLabel() string { return n.Label } func (n TerminalNode) GetLabel() string { return n.Label }
func (n TerminalNode) GetMainPort() Edge { return n.Main } func (n TerminalNode) GetMainPort() Edge { return n.Main }
func (n TerminalNode) GetAuxPorts() []Edge { return []Edge{} } func (n TerminalNode) GetAuxPorts() []Edge { return []Edge{} }
/** ------------------------------------------------------------------------- */

View File

@@ -5,8 +5,6 @@ type Expression interface {
Copy() Expression Copy() Expression
} }
/** ------------------------------------------------------------------------- */
type Abstraction struct { type Abstraction struct {
Parameter string Parameter string
Body Expression Body Expression
@@ -24,8 +22,6 @@ func NewAbstraction(parameter string, body Expression) *Abstraction {
return &Abstraction{Parameter: parameter, Body: body} return &Abstraction{Parameter: parameter, Body: body}
} }
/** ------------------------------------------------------------------------- */
type Application struct { type Application struct {
Abstraction Expression Abstraction Expression
Argument Expression Argument Expression
@@ -43,8 +39,6 @@ func NewApplication(function Expression, argument Expression) *Application {
return &Application{Abstraction: function, Argument: argument} return &Application{Abstraction: function, Argument: argument}
} }
/** ------------------------------------------------------------------------- */
type Variable struct { type Variable struct {
Value string Value string
} }
@@ -61,8 +55,6 @@ func NewVariable(name string) *Variable {
return &Variable{Value: name} return &Variable{Value: name}
} }
/** ------------------------------------------------------------------------- */
type Visitor interface { type Visitor interface {
VisitAbstraction(*Abstraction) VisitAbstraction(*Abstraction)
VisitApplication(*Application) VisitApplication(*Application)

View File

@@ -4,8 +4,6 @@ type Expression interface {
IsExpression() IsExpression()
} }
/** ------------------------------------------------------------------------- */
type Abstraction struct { type Abstraction struct {
Parameters []string Parameters []string
Body Expression Body Expression
@@ -30,8 +28,6 @@ func (Application) IsExpression() {}
func (Atom) IsExpression() {} func (Atom) IsExpression() {}
func (Clause) IsExpression() {} func (Clause) IsExpression() {}
/** ------------------------------------------------------------------------- */
func NewAbstraction(parameter []string, body Expression) *Abstraction { func NewAbstraction(parameter []string, body Expression) *Abstraction {
return &Abstraction{Parameters: parameter, Body: body} return &Abstraction{Parameters: parameter, Body: body}
} }

View File

@@ -4,8 +4,6 @@ type Statement interface {
IsStatement() IsStatement()
} }
/** ------------------------------------------------------------------------- */
type LetStatement struct { type LetStatement struct {
Name string Name string
Parameters []string Parameters []string
@@ -19,8 +17,6 @@ type DeclareStatement struct {
func (LetStatement) IsStatement() {} func (LetStatement) IsStatement() {}
func (DeclareStatement) IsStatement() {} func (DeclareStatement) IsStatement() {}
/** ------------------------------------------------------------------------- */
func NewLet(name string, parameters []string, body Expression) *LetStatement { func NewLet(name string, parameters []string, body Expression) *LetStatement {
return &LetStatement{Name: name, Parameters: parameters, Body: body} return &LetStatement{Name: name, Parameters: parameters, Body: body}
} }