mirror of
				https://gitlab.com/freepascal.org/fpc/source.git
				synced 2025-10-31 13:31:40 +01:00 
			
		
		
		
	+ Patch from Jeff Pohlmeyer to support multiline macros
This commit is contained in:
		
							parent
							
								
									4fbee8aafc
								
							
						
					
					
						commit
						ab4e8dfef4
					
				| @ -149,6 +149,8 @@ unit scan; | |||||||
| 
 | 
 | ||||||
|     const |     const | ||||||
|        in_define : boolean = false; |        in_define : boolean = false; | ||||||
|  |        { True if define spans to the next line } | ||||||
|  |        cont_line : boolean = false; | ||||||
|        { 1 after define; 2 after the ID to print the first separating space } |        { 1 after define; 2 after the ID to print the first separating space } | ||||||
|        in_space_define : byte = 0; |        in_space_define : byte = 0; | ||||||
|        arglevel : longint = 0; |        arglevel : longint = 0; | ||||||
| @ -668,12 +670,31 @@ D [0-9] | |||||||
| \n                      begin | \n                      begin | ||||||
|                            if in_define then |                            if in_define then | ||||||
|                             begin |                             begin | ||||||
|                               in_define:=false; |                               in_space_define:=0;   | ||||||
|                               in_space_define:=0; |                               if cont_line then | ||||||
|                               return(NEW_LINE); |                               begin | ||||||
|  |                                 cont_line:=false; | ||||||
|  |                               end | ||||||
|  |                               else | ||||||
|  |                               begin | ||||||
|  |                                 in_define:=false; | ||||||
|  |                                 return(NEW_LINE); | ||||||
|  |                               end; | ||||||
|                             end; |                             end; | ||||||
|                         end; |                        end; | ||||||
| .                       begin | \\$                    begin | ||||||
|  |                            if in_define then  | ||||||
|  |                            begin | ||||||
|  |                              cont_line:=true; | ||||||
|  |                            end | ||||||
|  |                            else | ||||||
|  |                            begin | ||||||
|  |                              writeln('Unexpected wrap of line ',yylineno); | ||||||
|  |                              writeln('"',yyline,'"'); | ||||||
|  |                              return(256); | ||||||
|  |                            end; | ||||||
|  |                        end; | ||||||
|  | .                      begin | ||||||
|                            writeln('Illegal character in line ',yylineno); |                            writeln('Illegal character in line ',yylineno); | ||||||
|                            writeln('"',yyline,'"'); |                            writeln('"',yyline,'"'); | ||||||
|                            return(256); |                            return(256); | ||||||
|  | |||||||
							
								
								
									
										4792
									
								
								utils/h2pas/scan.pas
									
									
									
									
									
								
							
							
						
						
									
										4792
									
								
								utils/h2pas/scan.pas
									
									
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
		Loading…
	
		Reference in New Issue
	
	Block a user
	 michael
						michael