CoolFace
Datasetpublic

basant307/AI_Governance_Project

sourceHugging Faceapache-2.0updated 2mo agoView on Hugging Face
0likes48downloads
inform7.js71 linesDownload Raw Back to languages
1/*2Language: Inform 73Author: Bruno Dias <bruno.r.dias@gmail.com>4Description: Language definition for Inform 7, a DSL for writing parser interactive fiction.5Website: http://inform7.com6Category: gaming7*/8 9function inform7(hljs) {10  const START_BRACKET = '\\[';11  const END_BRACKET = '\\]';12  return {13    name: 'Inform 7',14    aliases: [ 'i7' ],15    case_insensitive: true,16    keywords: {17      // Some keywords more or less unique to I7, for relevance.18      keyword:19        // kind:20        'thing room person man woman animal container '21        + 'supporter backdrop door '22        // characteristic:23        + 'scenery open closed locked inside gender '24        // verb:25        + 'is are say understand '26        // misc keyword:27        + 'kind of rule' },28    contains: [29      {30        className: 'string',31        begin: '"',32        end: '"',33        relevance: 0,34        contains: [35          {36            className: 'subst',37            begin: START_BRACKET,38            end: END_BRACKET39          }40        ]41      },42      {43        className: 'section',44        begin: /^(Volume|Book|Part|Chapter|Section|Table)\b/,45        end: '$'46      },47      {48        // Rule definition49        // This is here for relevance.50        begin: /^(Check|Carry out|Report|Instead of|To|Rule|When|Before|After)\b/,51        end: ':',52        contains: [53          {54            // Rule name55            begin: '\\(This',56            end: '\\)'57          }58        ]59      },60      {61        className: 'comment',62        begin: START_BRACKET,63        end: END_BRACKET,64        contains: [ 'self' ]65      }66    ]67  };68}69 70export { inform7 as default };71 
basant307/AI_Governance_Project · CoolFace