liberty-prettydiff
Version:
Language aware code comparison tool for several web based languages. It also beautifies, minifies, and a few other things.
52 lines (51 loc) • 1.3 kB
Plain Text
function jspretty__tokenize() {
var depthlist = [
["global", 0]
],
pdepth = [],
//identify variable declarations
vart = {
count: [],
index: [],
len: -1
},
car = {
honda: "white",
kia: "green",
toyota: "blue"
},
error = [
message,
token[g] + error[1]
];
class ({cat: "meow", dogggy: "bark"});
return {cat: "meow", dogggy: "bark"};
return {
cat: "meow",
dog: ["bark", "growl"]
};
foo({a: "a", b: "b", c: "c"});
foo(t, [
"a", "b", "c"
]);
foo(t, {
a:"a",
b:"b",
c:"c"
});
import React, {
PropTypes
} from 'react';
import {Foo, Bar} from 'FooBar';
import ("a", "b", "c") from "wherever";
import ({a: "a", b: "b", c: "c"}) from "wherever";
import (["a", "b", "c"]) from "wherever";
const {DefaultRoute, Route, Redirect} = Router;
class App extends Component {
render() {
return (
<div>Hello World</div>
);
}
}
};