Skip to content
This repository has been archived by the owner on Aug 14, 2018. It is now read-only.

inexorabletash/idldiff

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

idldiff

Extremely basic visual WebIDL comparison tool

Use it live at: https://inexorabletash.github.io/idldiff/

Instructions

  • The top left/right panels are CodeMirror editors that do very basic syntax highlighting of WebIDL files
  • Type or paste WebIDL in the left and right panels
  • The WebIDL will be validated using webidl2.js
  • The first error encountered will be shown at the bottom, with the offending line highlighted
  • If both left and right WebIDL are valid, the parsed results (AST structures) will be compared and the first set of differences reported.

Caveats:

  • The diff report is extremely dumb. Basically just a recursive JS comparison function, with some attempt to provide context.
  • By default, member order for interfaces is ignored. This is to facilitate testing that reordering/commenting existing WebIDL files has not changed anything. To override this, load the page with ?order as a query parameter.
  • webidl2.js is missing support for some newer WebIDL syntax such as iterable<>.

Hacking on it

To hack on it or host it locally, clone including submodules:

git clone --recursive git://github.com/inexorabletash/idldiff.git

Or:

git clone git://github.com/inexorabletash/idldiff.git
cd idldiff
git submodule update --init --recursive

Then just fire up a web server in the directory and load index.html

Roadmap

  • Ideally, the parsed ASTs would be reserialized to WebIDL and compared using a proper diff algorithm.

About

Basic visual IDL comparison tool

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published