Class: InitialCaseError

Inherits:
CompilerError show all
Defined in:
lib/compiler_error.rb

Instance Method Summary collapse

Methods inherited from CompilerError

#to_s

Constructor Details

#initialize(type, initial_case, ast) ⇒ InitialCaseError

Returns a new instance of InitialCaseError.



14
15
16
17
18
19
# File 'lib/compiler_error.rb', line 14

def initialize type, initial_case, ast
	super ast.position
	@type = type
	@initial_case = initial_case
	@ast = ast
end

Instance Method Details

#infoObject



21
22
23
24
25
26
27
# File 'lib/compiler_error.rb', line 21

def info
	if @type == 'node_nick' then
		return "'#{@ast.nickname}' : nickname of nodes should be #{@initial_case} case"
	else
		return "'#{@ast.name}' : name of #{@type}s should be #{@initial_case} case"
	end
end