mirror of
				https://gitlab.com/freepascal.org/fpc/source.git
				synced 2025-10-31 02:11:30 +01:00 
			
		
		
		
	+ the expr for names and indizies of exports sections support now
every type of expressions which evalute to a constant
This commit is contained in:
		
							parent
							
								
									5b6c306f6d
								
							
						
					
					
						commit
						bd5719a93e
					
				| @ -33,7 +33,7 @@ unit pexports; | |||||||
|       globtype,systems,tokens, |       globtype,systems,tokens, | ||||||
|       strings,cobjects,globals,verbose, |       strings,cobjects,globals,verbose, | ||||||
|       scanner,symconst,symtable,pbase, |       scanner,symconst,symtable,pbase, | ||||||
|       export,GenDef; |       export,GenDef,tree,pass_1,pexpr; | ||||||
| 
 | 
 | ||||||
|     procedure read_exports; |     procedure read_exports; | ||||||
| 
 | 
 | ||||||
| @ -43,6 +43,8 @@ unit pexports; | |||||||
|          DefString:string; |          DefString:string; | ||||||
|          ProcName:string; |          ProcName:string; | ||||||
|          InternalProcName:string; |          InternalProcName:string; | ||||||
|  |          pt : ptree; | ||||||
|  | 
 | ||||||
|       begin |       begin | ||||||
|          DefString:=''; |          DefString:=''; | ||||||
|          InternalProcName:=''; |          InternalProcName:=''; | ||||||
| @ -90,9 +92,17 @@ unit pexports; | |||||||
|                         if (idtoken=_INDEX) then |                         if (idtoken=_INDEX) then | ||||||
|                           begin |                           begin | ||||||
|                              consume(_INDEX); |                              consume(_INDEX); | ||||||
|                              hp^.options:=hp^.options or eo_index; |                              pt:=comp_expr(true); | ||||||
|                              val(pattern,hp^.index,code); |                              do_firstpass(pt); | ||||||
|  |                              if pt^.treetype=ordconstn then | ||||||
|  |                                hp^.index:=pt^.value | ||||||
|  |                              else | ||||||
|  |                                 begin | ||||||
|  |                                    hp^.index:=0; | ||||||
|                                    consume(_INTCONST); |                                    consume(_INTCONST); | ||||||
|  |                                 end; | ||||||
|  |                              hp^.options:=hp^.options or eo_index; | ||||||
|  |                              disposetree(pt); | ||||||
|                              if target_os.id=os_i386_win32 then |                              if target_os.id=os_i386_win32 then | ||||||
|                                DefString:=ProcName+'='+InternalProcName+' @ '+tostr(hp^.index) |                                DefString:=ProcName+'='+InternalProcName+' @ '+tostr(hp^.index) | ||||||
|                              else |                              else | ||||||
| @ -101,12 +111,17 @@ unit pexports; | |||||||
|                         if (idtoken=_NAME) then |                         if (idtoken=_NAME) then | ||||||
|                           begin |                           begin | ||||||
|                              consume(_NAME); |                              consume(_NAME); | ||||||
|                              hp^.name:=stringdup(pattern); |                              pt:=comp_expr(true); | ||||||
|                              hp^.options:=hp^.options or eo_name; |                              do_firstpass(pt); | ||||||
|                              if token=_CCHAR then |                              if pt^.treetype=stringconstn then | ||||||
|                               consume(_CCHAR) |                                hp^.name:=stringdup(strpas(pt^.value_str)) | ||||||
|                              else |                              else | ||||||
|  |                                 begin | ||||||
|  |                                    hp^.name:=stringdup(''); | ||||||
|                                    consume(_CSTRING); |                                    consume(_CSTRING); | ||||||
|  |                                 end; | ||||||
|  |                              hp^.options:=hp^.options or eo_name; | ||||||
|  |                              disposetree(pt); | ||||||
|                              DefString:=hp^.name^+'='+InternalProcName; |                              DefString:=hp^.name^+'='+InternalProcName; | ||||||
|                           end; |                           end; | ||||||
|                         if (idtoken=_RESIDENT) then |                         if (idtoken=_RESIDENT) then | ||||||
| @ -141,7 +156,11 @@ end. | |||||||
| 
 | 
 | ||||||
| { | { | ||||||
|   $Log$ |   $Log$ | ||||||
|   Revision 1.19  2000-02-09 13:22:56  peter |   Revision 1.20  2000-02-23 23:06:39  florian | ||||||
|  |     + the expr for names and indizies of exports sections support now | ||||||
|  |       every type of expressions which evalute to a constant | ||||||
|  | 
 | ||||||
|  |   Revision 1.19  2000/02/09 13:22:56  peter | ||||||
|     * log truncated |     * log truncated | ||||||
| 
 | 
 | ||||||
|   Revision 1.18  2000/01/07 01:14:28  peter |   Revision 1.18  2000/01/07 01:14:28  peter | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 florian
						florian