mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 22:09:28 +02:00
- removed unused scanner.tscannerstate, inserttext_begin and inserttext_end
(leftovers from the initial symcreat implementations that didn't work) git-svn-id: branches/jvmbackend@18637 -
This commit is contained in:
parent
90d82ad826
commit
e534a17c01
@ -67,7 +67,7 @@ implementation
|
|||||||
pd: tprocdef;
|
pd: tprocdef;
|
||||||
topowner: tdefentry;
|
topowner: tdefentry;
|
||||||
i: longint;
|
i: longint;
|
||||||
sstate: symcreat.tscannerstate;
|
sstate: tscannerstate;
|
||||||
needclassconstructor: boolean;
|
needclassconstructor: boolean;
|
||||||
begin
|
begin
|
||||||
{ if there is at least one constructor for a class, do nothing (for
|
{ if there is at least one constructor for a class, do nothing (for
|
||||||
@ -210,7 +210,7 @@ implementation
|
|||||||
i: longint;
|
i: longint;
|
||||||
sym: tstaticvarsym;
|
sym: tstaticvarsym;
|
||||||
fsym: tfieldvarsym;
|
fsym: tfieldvarsym;
|
||||||
sstate: symcreat.tscannerstate;
|
sstate: tscannerstate;
|
||||||
sl: tpropaccesslist;
|
sl: tpropaccesslist;
|
||||||
begin
|
begin
|
||||||
{ if it's a subrange type, don't create a new class }
|
{ if it's a subrange type, don't create a new class }
|
||||||
@ -338,7 +338,7 @@ implementation
|
|||||||
ssym: tstaticvarsym;
|
ssym: tstaticvarsym;
|
||||||
esym: tenumsym;
|
esym: tenumsym;
|
||||||
i: longint;
|
i: longint;
|
||||||
sstate: symcreat.tscannerstate;
|
sstate: tscannerstate;
|
||||||
begin
|
begin
|
||||||
case csym.constdef.typ of
|
case csym.constdef.typ of
|
||||||
enumdef:
|
enumdef:
|
||||||
|
@ -1808,7 +1808,7 @@ implementation
|
|||||||
|
|
||||||
procedure add_typedconst_init_routine(def: tabstractrecorddef);
|
procedure add_typedconst_init_routine(def: tabstractrecorddef);
|
||||||
var
|
var
|
||||||
sstate: symcreat.tscannerstate;
|
sstate: tscannerstate;
|
||||||
pd: tprocdef;
|
pd: tprocdef;
|
||||||
begin
|
begin
|
||||||
replace_scanner('tcinit_routine',sstate);
|
replace_scanner('tcinit_routine',sstate);
|
||||||
|
@ -78,13 +78,6 @@ interface
|
|||||||
|
|
||||||
tspecialgenerictoken = (ST_LOADSETTINGS,ST_LINE,ST_COLUMN,ST_FILEINDEX);
|
tspecialgenerictoken = (ST_LOADSETTINGS,ST_LINE,ST_COLUMN,ST_FILEINDEX);
|
||||||
|
|
||||||
tscannerstate = record
|
|
||||||
lasttokenpos: longint;
|
|
||||||
current_tokenpos,
|
|
||||||
current_filepos: tfileposinfo;
|
|
||||||
token: ttoken;
|
|
||||||
end;
|
|
||||||
|
|
||||||
{ tscannerfile }
|
{ tscannerfile }
|
||||||
tscannerfile = class
|
tscannerfile = class
|
||||||
private
|
private
|
||||||
@ -153,10 +146,6 @@ interface
|
|||||||
procedure reload;
|
procedure reload;
|
||||||
{ replaces current token with the text in p }
|
{ replaces current token with the text in p }
|
||||||
procedure substitutemacro(const macname:string;p:pchar;len,line,fileindex:longint);
|
procedure substitutemacro(const macname:string;p:pchar;len,line,fileindex:longint);
|
||||||
{ inserts the text in p before the current token; the current token
|
|
||||||
will be restored afterwards }
|
|
||||||
procedure inserttext_begin(const macname: string; const str: ansistring; out scannerstate: tscannerstate);
|
|
||||||
procedure inserttext_end(const scannerstate: tscannerstate);
|
|
||||||
{ Scanner things }
|
{ Scanner things }
|
||||||
procedure gettokenpos;
|
procedure gettokenpos;
|
||||||
procedure inc_comment_level;
|
procedure inc_comment_level;
|
||||||
@ -2465,35 +2454,6 @@ In case not, the value returned can be arbitrary.
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure tscannerfile.inserttext_begin(const macname: string; const str: ansistring; out scannerstate: tscannerstate);
|
|
||||||
begin
|
|
||||||
if (nexttoken<>NOTOKEN) then
|
|
||||||
internalerror(2011032103);
|
|
||||||
scannerstate.lasttokenpos:=lasttokenpos;
|
|
||||||
scannerstate.token:=token;
|
|
||||||
scannerstate.current_tokenpos:=current_tokenpos;
|
|
||||||
scannerstate.current_filepos:=current_filepos;
|
|
||||||
|
|
||||||
current_scanner.substitutemacro(macname,@str[1],length(str),
|
|
||||||
current_scanner.line_no,current_scanner.inputfile.ref_index);
|
|
||||||
current_scanner.readtoken(false);
|
|
||||||
end;
|
|
||||||
|
|
||||||
|
|
||||||
procedure tscannerfile.inserttext_end(const scannerstate: tscannerstate);
|
|
||||||
begin
|
|
||||||
if nexttoken<>NOTOKEN then
|
|
||||||
internalerror(2011032104);
|
|
||||||
nexttoken:=token;
|
|
||||||
cachenexttokenpos;
|
|
||||||
|
|
||||||
lasttokenpos:=scannerstate.lasttokenpos;
|
|
||||||
token:=scannerstate.token;
|
|
||||||
current_tokenpos:=scannerstate.current_tokenpos;
|
|
||||||
current_filepos:=scannerstate.current_filepos;
|
|
||||||
end;
|
|
||||||
|
|
||||||
|
|
||||||
procedure tscannerfile.do_gettokenpos(out tokenpos: longint; out filepos: tfileposinfo);
|
procedure tscannerfile.do_gettokenpos(out tokenpos: longint; out filepos: tfileposinfo);
|
||||||
begin
|
begin
|
||||||
tokenpos:=inputstart+(inputpointer-inputbuffer);
|
tokenpos:=inputstart+(inputpointer-inputbuffer);
|
||||||
|
Loading…
Reference in New Issue
Block a user