Ejemplo n.º 1
0
Archivo: none.go Proyecto: mm0205/gcasl
// NewNone returns a none.
func NewNone() *None {
	return &None{
		Label:   token.NewLabel(),
		Opcode:  token.NewOpcode(),
		Comment: token.NewComment(),
	}
}
Ejemplo n.º 2
0
// NewStart returns a start.
func NewStart() *Start {
	return &Start{
		Label:    token.NewLabel(),
		Opcode:   token.NewOpcode(),
		Operand1: token.NewAddress(),
		Comment:  token.NewComment(),
	}
}
Ejemplo n.º 3
0
Archivo: dc.go Proyecto: mm0205/gcasl
// NewDC returns a dc.
func NewDC() *DC {
	return &DC{
		Label:    token.NewLabel(),
		Opcode:   token.NewOpcode(),
		Operands: []token.Token{},
		Comment:  token.NewComment(),
	}
}
Ejemplo n.º 4
0
Archivo: ds.go Proyecto: mm0205/gcasl
// NewDS returns a ds.
func NewDS() *DS {
	return &DS{
		Label:    token.NewLabel(),
		Opcode:   token.NewOpcode(),
		Operand1: token.NewNumber(),
		Comment:  token.NewComment(),
	}
}
Ejemplo n.º 5
0
Archivo: adr.go Proyecto: mm0205/gcasl
// NewAdr returns a adr.
func NewAdr() *Adr {
	return &Adr{
		Label:    token.NewLabel(),
		Opcode:   token.NewOpcode(),
		Operand1: token.NewAddress(),
		Comment:  token.NewComment(),
	}
}
Ejemplo n.º 6
0
Archivo: r.go Proyecto: mm0205/gcasl
// NewR returns a r.
func NewR() *R {
	return &R{
		Label:    token.NewLabel(),
		Opcode:   token.NewOpcode(),
		Operand1: token.NewRegister(),
		Comment:  token.NewComment(),
	}
}
Ejemplo n.º 7
0
Archivo: radr.go Proyecto: mm0205/gcasl
// NewRAdr returns a radr.
func NewRAdr() *RAdr {
	return &RAdr{
		Label:    token.NewLabel(),
		Opcode:   token.NewOpcode(),
		Operand1: token.NewRegister(),
		Operand2: token.NewAddress(),
		Comment:  token.NewComment(),
	}
}
Ejemplo n.º 8
0
// NewInOut returns a inout.
func NewInOut() *InOut {
	return &InOut{
		Label:    token.NewLabel(),
		Opcode:   token.NewOpcode(),
		Operand1: token.NewOperandLabel(),
		Operand2: token.NewOperandLabel(),
		Comment:  token.NewComment(),
	}
}
Ejemplo n.º 9
0
func TestCommentParse(t *testing.T) {
	testCaseList := []testCaseForTestCommentParse{
		{data: `; This is Comment`},
		{data: ` ; This is comment`},
	}
	for _, testCase := range testCaseList {
		testData := testCase.data

		source := token.NewSource(testData)
		register := token.NewComment()
		err := register.Parse(source)
		if err != nil {
			t.Error(err)
		}
	}
}
Ejemplo n.º 10
0
Archivo: end.go Proyecto: mm0205/gcasl
// NewEnd returns a end.
func NewEnd() *End {
	return &End{
		Opcode:  token.NewOpcode(),
		Comment: token.NewComment(),
	}
}