mirror of
				https://gitlab.com/freepascal.org/fpc/source.git
				synced 2025-10-31 02:51:37 +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 | ||||
|        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 } | ||||
|        in_space_define : byte = 0; | ||||
|        arglevel : longint = 0; | ||||
| @ -668,11 +670,30 @@ D [0-9] | ||||
| \n                      begin | ||||
|                            if in_define then | ||||
|                             begin | ||||
|                               in_define:=false; | ||||
|                               in_space_define:=0;   | ||||
|                               if cont_line then | ||||
|                               begin | ||||
|                                 cont_line:=false; | ||||
|                               end | ||||
|                               else | ||||
|                               begin | ||||
|                                 in_define:=false; | ||||
|                                 return(NEW_LINE); | ||||
|                               end; | ||||
|                             end; | ||||
|                        end; | ||||
| \\$                    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('"',yyline,'"'); | ||||
|  | ||||
							
								
								
									
										4776
									
								
								utils/h2pas/scan.pas
									
									
									
									
									
								
							
							
						
						
									
										4776
									
								
								utils/h2pas/scan.pas
									
									
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
		Loading…
	
		Reference in New Issue
	
	Block a user
	 michael
						michael