Sha256: 3d7e894bdf8036d03b720ffe79c4206af7e8f8153cea3ba4514d455bdb5a0882

Contents?: true

Size: 1.38 KB

Versions: 8

Compression:

Stored size: 1.38 KB

Contents

#include <cstdint>
#include <cstddef>
#include <string>
#include <ostream>
#include <sstream>
#include <stack>
#include "ruby.pb.h"

namespace ruby_fuzzer {
	class protoConverter
	{
	public:
		protoConverter() {
			m_numLiveVars = 1;
			m_numVarsPerScope.push(m_numLiveVars);
		}
		protoConverter(protoConverter const& x) {
			m_numLiveVars = x.m_numLiveVars;
			m_numVarsPerScope = x.m_numVarsPerScope;
		}
		~protoConverter() {}
		std::string FunctionToString(Function const& _input);

	private:
		void visit(ArrType const&);
		void visit(Array const&);
		void visit(AssignmentStatement const&);
		void visit(BinaryOp const&);
		void visit(BuiltinFuncs const&);
		void visit(Const const&);
		void visit(Function const&);
		void visit(HashType const&);
		void visit(IfElse const&);
		void visit(KVPair const&);
		void visit(MathConst const&);
		void visit(MathOps const&);
		void visit(MathType const&);
		void visit(ObjectSpace const&);
		void visit(Rvalue const&);
		void visit(Statement const&);
		void visit(StatementSeq const&);
		void visit(StringExtNoArg const&);
		void visit(Ternary const&);
		void visit(Time const&);
		void visit(VarRef const&);
		template <class T>
		void visit(google::protobuf::RepeatedPtrField<T> const& _repeated_field);

		std::string removeSpecial(const std::string &x);

		std::ostringstream m_output;
		std::stack<uint8_t> m_numVarsPerScope;
		int32_t m_numLiveVars;
	};
}

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
script_core-0.2.7 ext/enterprise_script_service/mruby/oss-fuzz/proto_to_ruby.h
script_core-0.2.6 ext/enterprise_script_service/mruby/oss-fuzz/proto_to_ruby.h
script_core-0.2.5 ext/enterprise_script_service/mruby/oss-fuzz/proto_to_ruby.h
script_core-0.2.4 ext/enterprise_script_service/mruby/oss-fuzz/proto_to_ruby.h
script_core-0.2.3 ext/enterprise_script_service/mruby/oss-fuzz/proto_to_ruby.h
script_core-0.2.2 ext/enterprise_script_service/mruby/oss-fuzz/proto_to_ruby.h
script_core-0.2.1 ext/enterprise_script_service/mruby/oss-fuzz/proto_to_ruby.h
script_core-0.2.0 ext/enterprise_script_service/mruby/oss-fuzz/proto_to_ruby.h