PageRenderTime 7ms CodeModel.GetById 2ms app.highlight 1ms RepoModel.GetById 2ms app.codeStats 0ms

/tutorial/backtracking/tiny_prolog/prolog_var.e

http://github.com/tybor/Liberty
Specman e | 21 lines | 21 code | 0 blank | 0 comment | 2 complexity | d8c6bf6d6c70c470e0cf31165a812053 MD5 | raw file
 1class PROLOG_VAR
 2inherit PROLOG_TERM
 3feature
 4	type: INTEGER is
 5		do
 6			if value = Void then
 7				Result = type_var
 8			else
 9				Result = value.type
10			end
11		end
12	deref: PROLOG_TERM is 
13		do
14			if value = Void then
15				Result := Current
16			else
17				Result := value
18			end	
19		end
20	value: PROLOG_TERM
21end