-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscanner_command_3.c
More file actions
45 lines (38 loc) · 1.41 KB
/
scanner_command_3.c
File metadata and controls
45 lines (38 loc) · 1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* scanner_command_3.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: seungbki <seungbki@student.42seoul.kr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/03/28 06:07:06 by seungbki #+# #+# */
/* Updated: 2022/03/28 06:18:14 by seungbki ### ########.fr */
/* */
/* ************************************************************************** */
#include "scanner_command.h"
#include "token.h"
void add_precision(void *token, char lexeme)
{
((t_token *)token)->precision *= 10;
((t_token *)token)->precision += lexeme - '0';
}
void set_percentage(void *token, char lexeme)
{
((t_token *)token)->id = 2;
(void)lexeme;
}
void set_upper_x(void *token, char lexeme)
{
((t_token *)token)->id = 3;
(void)lexeme;
}
void set_lower_c(void *token, char lexeme)
{
((t_token *)token)->id = 4;
(void)lexeme;
}
void set_lower_d(void *token, char lexeme)
{
((t_token *)token)->id = 5;
(void)lexeme;
}