Jedi Code Format: Comments, formatting. Issue , patch from BrunoK.

git-svn-id: trunk@62809 -
This commit is contained in:
juha 2020-03-25 13:49:42 +00:00
parent 434cd7d38c
commit ab7cad1fc8
6 changed files with 30 additions and 17 deletions

View File

@ -2385,7 +2385,20 @@ procedure TBuildParseTree.RecogniseVarDecl;
var
lc: TSourceToken;
begin
// VarDecl -> IdentList ':' Type [(ABSOLUTE (Ident | ConstExpr)) | '=' ConstExpr]
// (* attempted EBNF definition of a variable definition *)
// named : 'name' var_name
// exppubl : ( 'export' | 'public' ) [named] ';'
// external : ( 'external' [[lib_name] [named]] ';'
// absolute : 'absolute' var_name
// initvalue : '=' ConstExpr
// hints : [ 'deprecated'
// | 'experimental'
// | 'platform'
// | 'unimplemented' ]
// identlist : var_name { ',' var_name }
//
// vardef : identlist ':' vartype [ absolute ] ';'
// [( exppubl | external )] [ hints ]
PushNode(nVarDecl);
@ -2397,7 +2410,7 @@ begin
if lc.TokenType = ttAbsolute then
begin
PushNode(nAbsoluteVar);
PushNode(nVarAbsolute);
Recognise(ttAbsolute);
if (fcTokenList.FirstSolidWordType in IdentifierTypes) then

View File

@ -113,7 +113,7 @@ uses
JcfRegistrySettings;
const
CurlyLeft = '{'; //widechar(123);
CurlyLeft = '{'; //widechar(123);
CurlyRight = '}'; //widechar(125);
function CheckMultiByte(const pcChar: char): boolean;
@ -642,7 +642,7 @@ begin
Result := True;
end;
{ ~bk 2014.11.01 - Bin numbers are prefixed with % }
{ Bin numbers are prefixed with % }
function TBuildTokenList.TryBinNumber(const pcToken: TSourceToken): boolean;
begin
Result := False;

View File

@ -77,7 +77,7 @@ type
nProcedureType,
nVarSection,
nVarDecl,
nAbsoluteVar,
nVarAbsolute,
nVariableInit,
nDesignator,
nExpression,
@ -279,7 +279,7 @@ begin
Result := 'Var section';
nVarDecl:
Result := 'Var decl';
nAbsoluteVar:
nVarAbsolute:
Result := 'Absolute var';
nVariableInit:
Result := 'Variable init';

View File

@ -63,9 +63,9 @@ type
ttUnknown, // default category used for unrecognised input
// spacing
ttReturn, // CR & LF chars
ttReturn, // CR & LF chars
ttWhiteSpace, // spaces & tabs
ttComment, // one of these
ttComment, // one of these
ttConditionalCompilationRemoved,
@ -73,13 +73,13 @@ type
ttQuotedLiteralString, // 'This is a string'
ttSemicolon, // ;
ttColon, // :
ttComma,
ttOpenBracket,
ttCloseBracket,
ttOpenSquareBracket,
ttCloseSquareBracket,
ttDot,
ttHash,
ttComma, // ,
ttOpenBracket, // (
ttCloseBracket, // )
ttOpenSquareBracket, // [
ttCloseSquareBracket,// ]
ttDot, // .
ttHash, // #
ttDoubleDot, // '..' as in '[1 .. 2]'
ttAssign, // :=
ttAmpersand, // '&' is used in Asm

View File

@ -152,7 +152,7 @@ begin
end;
{ 'absolute' as a var directive }
if (pt.TokenType = ttAbsolute) and pt.HasParentNode(nAbsoluteVar) then
if (pt.TokenType = ttAbsolute) and pt.HasParentNode(nVarAbsolute) then
begin
Result := True;
exit;

View File

@ -206,7 +206,7 @@ begin
end;
{ 'absolute' as a var directive }
if (pt.TokenType = ttAbsolute) and pt.HasParentNode(nAbsoluteVar) then
if (pt.TokenType = ttAbsolute) and pt.HasParentNode(nVarAbsolute) then
begin
Result := True;
exit;