mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	parse.y: TAB_WIDTH
* parse.y (TAB_WIDTH, token_info_get_column): add constant for column calcuation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									10bb9e6fab
								
							
						
					
					
						commit
						a73f0f2cae
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		
							
								
								
									
										4
									
								
								parse.y
									
										
									
									
									
								
							
							
						
						
									
										4
									
								
								parse.y
									
										
									
									
									
								
							|  | @ -38,6 +38,8 @@ | |||
| # define WARN_PAST_SCOPE 0 | ||||
| #endif | ||||
| 
 | ||||
| #define TAB_WIDTH 8 | ||||
| 
 | ||||
| #define YYMALLOC(size)		rb_parser_malloc(parser, (size)) | ||||
| #define YYREALLOC(ptr, size)	rb_parser_realloc(parser, (ptr), (size)) | ||||
| #define YYCALLOC(nelem, size)	rb_parser_calloc(parser, (nelem), (size)) | ||||
|  | @ -5309,7 +5311,7 @@ token_info_get_column(struct parser_params *parser, const char *pend) | |||
|     const char *p; | ||||
|     for (p = lex_pbeg; p < pend; p++) { | ||||
| 	if (*p == '\t') { | ||||
| 	    column = (((column - 1) / 8) + 1) * 8; | ||||
| 	    column = (((column - 1) / TAB_WIDTH) + 1) * TAB_WIDTH; | ||||
| 	} | ||||
| 	column++; | ||||
|     } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 nobu
						nobu