Skip to content

Instantly share code, notes, and snippets.

View Marwes's full-sized avatar

Markus Westerlind Marwes

View GitHub Profile
@Marwes
Marwes / Cargo.toml
Last active December 11, 2019 09:44 — forked from huin/Cargo.toml
Userdata type unknown by name in Gluon
[package]
name = "gluon_userdata"
version = "0.1.0"
edition = "2018"
[dependencies]
gluon = "0.13.1"
gluon_codegen = "0.13.1"
gluon_vm = "0.13.1"
@Marwes
Marwes / cargo_test.txt
Created March 15, 2018 17:50 — forked from boxofrox/cargo_test.txt
simple shell parser in Rust using combine crate (not working)
$ cargo test
Compiling csvmap v0.1.0 (file:///home/charetjc/files/development/rust/tinker/csvmap)
Finished dev [unoptimized + debuginfo] target(s) in 2.34 secs
Running target/debug/deps/csvmap-cdc7458d4bf17d5e
running 5 tests
test tests::can_parse ... ok
test tests::can_parse_single_quoted_shell_arg ... ok
test tests::can_parse_double_quoted_shell_arg ... ok
test tests::can_parse_any_shell_arg ... FAILED
@Marwes
Marwes / parser.rs
Last active July 20, 2017 18:12 — forked from MaikKlein/parser.rs
use ast::*;
use std::str::FromStr;
grammar;
pub Entry: () = {
"#" "[" "entry" "]" => (),
};
pub Statement: Statement<'input> = {
"let" <var:Variable> "=" <init_expr: Expr> ";"
@Marwes
Marwes / main.rs
Last active July 4, 2017 15:30 — forked from Xanewok/main.rs
extern crate languageserver_types as ls_types;
pub trait Request {
type Param;
type Result;
// Has to be a method as associated constants are unstable
fn method(&self) -> &'static str;
}
struct RequestStruct<Params> {
@Marwes
Marwes / combine_http_parser.rs
Last active August 29, 2015 14:27 — forked from m4rw3r/combine_http_parser.rs
Version of the attoparsec example using the parser combinator Combine.
extern crate combine;
use combine::*;
use combine::combinator::take_while1;
use std::fs::File;
use std::env;
#[derive(Debug)]