java -cp '*' net.sf.saxon.Transform -x:org.ccil.cowan.tagsoup.Parser example.html example.xsl
(I have saxon9he.jar
and tagsoup-1.2.1.jar
in the current directory)
#[macro_export] | |
macro_rules! varmap { | |
($enum_ty:ty => $val_ty:ty ; $($enum:pat => $val:expr),+ $(,)?) => { | |
{ | |
const SIZE: usize = $crate::varmap!(@count $($val),*); | |
struct Wrapper([$val_ty; SIZE]); | |
impl std::ops::Index<$enum_ty> for Wrapper { | |
type Output = $val_ty; |
Rust compiler source code has a lot of this comment that explains how stuff is implemented.
TODO: add more as you find them
Does this works?
// plugin.rs | |
// This code should be compiled into a shared library | |
#![crate_type="dylib"] | |
#![allow(dead_code, unused_variables)] | |
use std::os::raw; | |
// function provided by the glue code | |
extern "C" { | |
fn hook_event( |
1 | 2 | 3 | 4 | |
---|---|---|---|---|
5 | 6 | 7 | 8 | |
9 | 10 | 11 | 12 |
<title>https://gistpreview.github.io/?1f5e8c81b22063ad38682a36852ce6a9/index.html</title> |
"Bohemian Rhapsody" | |
Is this the real life? | |
Is this just fantasy? | |
Caught in a landslide, | |
No escape from reality. | |
Open your eyes, | |
Look up to the skies and see, | |
I'm just a poor boy, I need no sympathy, |