mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-26 15:33:46 +02:00
Jedi Code Format: Comments, formatting. Issue #36825, patch from BrunoK.
git-svn-id: trunk@62809 -
This commit is contained in:
parent
434cd7d38c
commit
ab7cad1fc8
components/jcf2
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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';
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user