From df342798b00d4905983b3b8a5fad98e2ff96d6f7 Mon Sep 17 00:00:00 2001 From: Andrew Plotkin Date: Sun, 19 Jan 2014 01:19:24 -0500 Subject: [PATCH 1/3] YAML file recognition for Inform 7, an interactive fiction design language. The team account https://github.com/i7 has several active Inform 7 projects. --- lib/linguist/languages.yml | 6 ++++++ samples/Inform 7/Trivial Extension.i7x | 6 ++++++ samples/Inform 7/story.ni | 12 ++++++++++++ 3 files changed, 24 insertions(+) create mode 100644 samples/Inform 7/Trivial Extension.i7x create mode 100644 samples/Inform 7/story.ni diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 340c7682..4a4df48f 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -767,6 +767,12 @@ Idris: extensions: - .lidr +Inform 7: + type: programming + primary_extension: .ni + extensions: + - .i7x + Inno Setup: primary_extension: .iss lexer: Text only diff --git a/samples/Inform 7/Trivial Extension.i7x b/samples/Inform 7/Trivial Extension.i7x new file mode 100644 index 00000000..1aae1b85 --- /dev/null +++ b/samples/Inform 7/Trivial Extension.i7x @@ -0,0 +1,6 @@ +Version 1 of Trivial Extension by Andrew Plotkin begins here. + +A cow is a kind of animal. A cow can be purple. + +Trivial Extension ends here. + diff --git a/samples/Inform 7/story.ni b/samples/Inform 7/story.ni new file mode 100644 index 00000000..f8873369 --- /dev/null +++ b/samples/Inform 7/story.ni @@ -0,0 +1,12 @@ +"Test Case" by Andrew Plotkin. + +Include Trivial Extension by Andrew Plotkin. + +The Kitchen is a room. + +[This kitchen is modelled after the one in Zork, although it lacks the detail to establish this to the player.] + +A purple cow called Gelett is in the Kitchen. + +Instead of examining Gelett: + say "You'd rather see than be one." From 028f2ab92cd8abb0bf9a0dc7772c5938af8061be Mon Sep 17 00:00:00 2001 From: Andrew Plotkin Date: Mon, 20 Jan 2014 00:00:16 -0500 Subject: [PATCH 2/3] Inform has long lines, so we line wrap. --- lib/linguist/languages.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 4a4df48f..1941ede8 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -769,6 +769,7 @@ Idris: Inform 7: type: programming + wrap: true primary_extension: .ni extensions: - .i7x From d394e8db2150322b4714ab9db5c34673886fb627 Mon Sep 17 00:00:00 2001 From: Andrew Plotkin Date: Wed, 12 Mar 2014 14:44:13 -0400 Subject: [PATCH 3/3] Added a lexer definition (text only). I may build an Inform 7 highlighter/lexer someday, but not this week. --- lib/linguist/languages.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 99d702e7..03fb9676 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -809,6 +809,7 @@ Idris: Inform 7: type: programming + lexer: Text only wrap: true primary_extension: .ni extensions: