Skip to content

Instantly share code, notes, and snippets.

View deiuch's full-sized avatar

Denis Chernikov deiuch

View GitHub Profile
@deiuch
deiuch / cyclic_iterator.hpp
Last active October 1, 2020 21:26
Cyclic iterator implementation draft.
#ifndef CYCLIC_ITERATOR_HPP_
#define CYCLIC_ITERATOR_HPP_
#include <iterator>
namespace std {
template <class ForwardIt>
class cyclic_iterator {
public:
@deiuch
deiuch / JsonIr.cs
Last active June 1, 2019 13:54
Code from SLang project on parser's AST serialization into JSON IR
using System;
using System.Collections.Generic;
using System.Linq;
namespace SLang.Service
{
public class JsonIr
{
public const string JSON_NULL_REPRESENTATION = "null";
public static string NL { get; set; } = Environment.NewLine;