Gyoji Compiler
Loading...
Searching...
No Matches
input-source-file.hpp
1/* Copyright 2025 Jonathan S. Arney
2 *
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * https://github.com/jarney/gyoji/blob/master/LICENSE
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15#include <gyoji-misc/input-source.hpp>
16#include <stdio.h>
17#include <unistd.h>
18#include <fcntl.h>
19
20namespace Gyoji::misc {
21
31 public:
43 InputSourceFile(int _fd);
60 void read(char *buf, int &result, int max_size);
61
62 private:
63 int fd;
64 };
65
66};
This is an input source for files.
Definition input-source-file.hpp:30
~InputSourceFile()
Move along, nothing to see here.
Definition input-source-file.cpp:24
void read(char *buf, int &result, int max_size)
Method to read input from the file.
Definition input-source-file.cpp:27
Input Source used by lexer.
Definition input-source.hpp:28