Beispiel #1
1
		static void apply(const pegtl::input& in, MacroLineState& state) {
//			printf("Number %s\n", in.string().c_str());
			auto& nodes = state.loops.size() ? state.loops.back().nodes : state.env.nodes;
			nodes.push_back({std::stof(in.string()), state.delta});
			state.delta = false;
		}
Beispiel #2
0
		static void apply(const pegtl::input& in, MacroLineState& state) {
//			printf("LoopCount %s\n", in.string().c_str());
			state.loops.push_back({ std::stoi(in.string()) });
		}
Beispiel #3
0
		static void apply(const pegtl::input& in, MacroLineState& state) {
			state.name = in.string();
		}
Beispiel #4
0
 static void apply(const pegtl::input& in, std::vector<double>& out) {
   out.push_back(std::stod(in.string()));
 }