RAW HipHoo RAW

Started by Robert, December 13, 2023, 10:08:21 PM

Previous topic - Next topic

MrBcx

#4
Updated silver bullet ...  ;)

IF InFunction = FALSE THEN
       IF LEFTSTR(Arg$, "RAW ", 1) THEN Arg$ = "STATIC " + MID$(Arg$, 4)
END IF

Robert

Quote from: MrBcx on December 14, 2023, 09:19:56 AM
Inserting this between line 14175 and 14176 seems to be the silver bullet:



IF LEFTSTR(Arg$, "RAW ", 1) THEN Arg$ = "STATIC " + MID$(Arg$, 4)



which becomes:

CALL RemEmptyTokens
CALL BuildDelimStr(1, Ndx, Arg$)
IF LEFTSTR(Arg$, "RAW ", 1) THEN Arg$ = "STATIC " + MID$(Arg$, 4)
CALL FastLexer(Arg$, SPC$, ",(){}=")


Unfortunately, "static" is added in the SUB where it is not wanted.


void TheSub (void)
{
  static int      SUBScopeRAWINTEGER;
  int     SUBScopeRAWINTEGERSigil;
  static int      SUBScopeRAWINTEGERArray[2];
  int     SUBScopeRAWINTEGERArraySigil[2];
}

MrBcx

Inserting this between line 14175 and 14176 seems to be the silver bullet:



IF LEFTSTR(Arg$, "RAW ", 1) THEN Arg$ = "STATIC " + MID$(Arg$, 4)



which becomes:

CALL RemEmptyTokens
CALL BuildDelimStr(1, Ndx, Arg$)
IF LEFTSTR(Arg$, "RAW ", 1) THEN Arg$ = "STATIC " + MID$(Arg$, 4)
CALL FastLexer(Arg$, SPC$, ",(){}=")


Robert

Forward propagation style syntax of file-scope level RAW data types does not translate to "static datatype"
File-scope level sigilized RAW data types are O.K.

Procedural RAW are O.K.

INTEGER Example



RAW AS INTEGER FileScopeRAWINTEGER
RAW FileScopeRAWINTEGERSigil%
RAW AS INTEGER FileScopeRAWINTEGERArray[2]
RAW FileScopeRAWINTEGERArraySigil%[2]

CALL TheSub()

SUB TheSub()
RAW AS INTEGER SUBScopeRAWINTEGER
RAW SUBScopeRAWINTEGERSigil%
RAW AS INTEGER SUBScopeRAWINTEGERArray[2]
RAW SUBScopeRAWINTEGERArraySigil%[2]
END SUB


STRING Example

RAW AS STRING FileScopeRAWstring
RAW FileScopeRAWstringSigil$
RAW AS STRING FileScopeRAWStringArray[2]
RAW FileScopeRAWStringArraySigil$[2]

CALL TheSub()

SUB TheSub()
RAW AS STRING SUBScopeRAWstring
RAW SUBScopeRAWstringSigil$
RAW AS STRING SUBScopeRAWStringArray[2]
RAW SUBScopeRAWStringArraySigil$[2]
END SUB