Esempio n. 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;
		}
Esempio n. 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()) });
		}
Esempio n. 3
0
		static void apply(const pegtl::input& in, MacroLineState& state) {
			state.name = in.string();
		}
Esempio n. 4
0
 static void apply(const pegtl::input& in, std::vector<double>& out) {
   out.push_back(std::stod(in.string()));
 }