Repository: pygments/pygments

Issue:
new lexer request: Vue.js
I'd like to highlight Vue.js code, something like:

~~~
```vue
<script>
// give each todo a unique id
let id = 0

export default {
  data() {
    return {
      newTodo: '',
      todos: [
        { id: id++, text: 'Learn HTML' },
        { id: id++, text: 'Learn JavaScript' },
        { id: id++, text: 'Learn Vue' }
      ]
    }
  },
  methods: {
    addTodo() {
      this.todos.push({ id: id++, text: this.newTodo})
      this.newTodo = ''
    },
    removeTodo(todo) {
      this.todos = this.todos.filter((element) => element.id != todo.id)
    }
  }
}
</script>

<template>
  <form @submit.prevent="addTodo">
    <input v-model="newTodo">
    <button>Add Todo</button>
  </form>
  <ul>
    <li v-for="todo in todos" :key="todo.id">
      {{ todo.text }}
      <button @click="removeTodo(todo)">X</button>
    </li>
  </ul>
</template>
```
~~~

I've seen that [vue-lexer](https://github.com/testdrivenio/vue-lexer) exists which is based on [jsx-lexer](https://github.com/fcurella/jsx-lexer). Is there any chance for it to be integrated in this repository so we don't have to install external packages?

Thanks

Discussion:
@jeanas: Sure. Feel free to submit a PR.@jd-solanki: I am also building CLI that prints the vue code. Unfortunately, it doesn't support vue 😞 

Anyway, I am glad to have pygments.

Will wait for vue support.

Solution patch:
diff --git a/pygments/formatters/html.py b/pygments/formatters/html.py
index 3330c1d5..78eeed13 100644
--- a/pygments/formatters/html.py
+++ b/pygments/formatters/html.py
@@ -44,7 +44,15 @@ def webify(color):
     if color.startswith('calc') or color.startswith('var'):
         return color
     else:
-        return '#' + color
+        # Check if the color can be shortened from 6 to 3 characters
+        color = color.upper()
+        if (len(color) == 6 and
+            (    color[0] == color[1]
+             and color[2] == color[3]
+             and color[4] == color[5])):
+            return f'#{color[0]}{color[2]}{color[4]}'
+        else:
+            return f'#{color}'
 
 
 def _get_ttype_class(ttype):
diff --git a/pygments/formatters/img.py b/pygments/formatters/img.py
index d5c97d47..554298db 100644
--- a/pygments/formatters/img.py
+++ b/pygments/formatters/img.py
@@ -132,7 +132,8 @@ class FontManager:
                          '/Library/Fonts/', '/System/Library/Fonts/'):
             font_map.update(
                 (os.path.splitext(f)[0].lower(), os.path.join(font_dir, f))
-                for f in os.listdir(font_dir)
+                for _, _, files in os.walk(font_dir)
+                for f in files
                 if f.lower().endswith(('ttf', 'ttc')))
 
         for name in STYLES['NORMAL']:
diff --git a/pygments/lexers/_googlesql_builtins.py b/pygments/lexers/_googlesql_builtins.py
new file mode 100644
index 00000000..b591546c
--- /dev/null
+++ b/pygments/lexers/_googlesql_builtins.py
@@ -0,0 +1,918 @@
+"""
+    pygments.lexers._googlesql_builtins
+    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+    Autogenerated data files for the GoogleSQL lexer.
+
+    :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
+    :license: BSD, see LICENSE for details.
+"""
+
+constants = [
+    'FALSE',
+    'NULL',
+    'TRUE',
+    'UNKNOWN',
+]
+
+# Everything below this line is auto-generated from the GoogleSQL source code.
+# ----------------------------------------------------------------------------
+
+functionnames = [
+    'ABS',
+    'ACOS',
+    'ACOSH',
+    'AEAD.DECRYPT_BYTES',
+    'AEAD.DECRYPT_STRING',
+    'AEAD.ENCRYPT',
+    'AEAD.ENVELOPE_DECRYPT_BYTES',
+    'AEAD.ENVELOPE_DECRYPT_STRING',
+    'AEAD.ENVELOPE_ENCRYPT',
+    'ALL_DIFFERENT',
+    'ANON_AVG',
+    'ANON_COUNT',
+    'ANON_COUNT',
+    'ANON_PERCENTILE_CONT',
+    'ANON_QUANTILES',
+    'ANON_STDDEV_POP',
+    'ANON_SUM',
+    'ANON_VAR_POP',
+    'ANY_VALUE',
+    'APPROX_COSINE_DISTANCE',
+    'APPROX_COUNT_DISTINCT',
+    'APPROX_DOT_PRODUCT',
+    'APPROX_EUCLIDEAN_DISTANCE',
+    'APPROX_QUANTILES',
+    'APPROX_TOP_COUNT',
+    'APPROX_TOP_SUM',
+    'ARRAY[KEY()]',
+    'ARRAY[SAFE_KEY()]',
+    'ARRAY_AGG',
+    'ARRAY_AVG',
+    'ARRAY_CONCAT',
+    'ARRAY_CONCAT_AGG',
+    'ARRAY_FILTER',
+    'ARRAY_FIND',
+    'ARRAY_FIND_ALL',
+    'ARRAY_FIRST',
+    'ARRAY_FIRST_N',
+    'ARRAY_INCLUDES',
+    'ARRAY_INCLUDES_ALL',
+    'ARRAY_INCLUDES_ANY',
+    'ARRAY_IS_DISTINCT',
+    'ARRAY_LAST',
+    'ARRAY_LAST_N',
+    'ARRAY_LENGTH',
+    'ARRAY_MAX',
+    'ARRAY_MIN',
+    'ARRAY_OFFSET',
+    'ARRAY_OFFSETS',
+    'ARRAY_REMOVE_FIRST_N',
+    'ARRAY_REMOVE_LAST_N',
+    'ARRAY_REVERSE',
+    'ARRAY_SLICE',
+    'ARRAY_SUM',
+    'ARRAY_TO_STRING',
+    'ARRAY_TRANSFORM',
+    'ARRAY_ZIP',
+    'ASCII',
+    'ASIN',
+    'ASINH',
+    'ATAN',
+    'ATAN2',
+    'ATANH',
+    'AVG',
+    'BIT_AND',
+    'BIT_COUNT',
+    'BIT_OR',
+    'BIT_XOR',
+    'BOOL',
+    'BOOL_ARRAY',
+    'BYTE_LENGTH',
+    'CASE',
+    'CAST',
+    'CBRT',
+    'CEIL',
+    'CEILING',
+    'CHARACTER_LENGTH',
+    'CHAR_LENGTH',
+    'CHR',
+    'COALESCE',
+    'CODE_POINTS_TO_BYTES',
+    'CODE_POINTS_TO_STRING',
+    'COLLATE',
+    'CONCAT',
+    'CORR',
+    'COS',
+    'COSH',
+    'COSINE_DISTANCE',
+    'COT',
+    'COTH',
+    'COUNT',
+    'COUNT(*)',
+    'COUNTIF',
+    'COVAR_POP',
+    'COVAR_SAMP',
+    'CSC',
+    'CSCH',
+    'CUME_DIST',
+    'CURRENT_DATE',
+    'CURRENT_DATETIME',
+    'CURRENT_TIME',
+    'CURRENT_TIMESTAMP',
+    'D3A_COUNT.EXTRACT',
+    'D3A_COUNT.INIT',
+    'D3A_COUNT.MERGE',
+    'D3A_COUNT.MERGE_PARTIAL',
+    'D3A_COUNT.TO_HLL',
+    'DATE',
+    'DATETIME',
+    'DATETIME_ADD',
+    'DATETIME_BUCKET',
+    'DATETIME_DIFF',
+    'DATETIME_SUB',
+    'DATETIME_TRUNC',
+    'DATE_ADD',
+    'DATE_BUCKET',
+    'DATE_DIFF',
+    'DATE_FROM_UNIX_DATE',
+    'DATE_SUB',
+    'DATE_TRUNC',
+    'DENSE_RANK',
+    'DESTINATION_NODE_ID',
+    'DETERMINISTIC_DECRYPT_BYTES',
+    'DETERMINISTIC_DECRYPT_STRING',
+    'DETERMINISTIC_ENCRYPT',
+    'DIV',
+    'DOT_PRODUCT',
+    'EDGES',
+    'EDIT_DISTANCE',
+    'ELEMENTWISE_AVG',
+    'ELEMENTWISE_SUM',
+    'ELEMENT_DEFINITION_NAME',
+    'ELEMENT_ID',
+    'ENDS_WITH',
+    'ENUM_VALUE_DESCRIPTOR_PROTO',
+    'ERROR',
+    'EUCLIDEAN_DISTANCE',
+    'EXP',
+    'EXTRACT',
+    'EXTRACT_FOR_DP_APPROX_COUNT_DISTINCT',
+    'FARM_FINGERPRINT',
+    'FILTER_FIELDS',
+    'FIRST_VALUE',
+    'FLATTEN',
+    'FLOAT32',
+    'FLOAT32_ARRAY',
+    'FLOAT64',
+    'FLOAT64_ARRAY',
+    'FLOOR',
+    'FORMAT',
+    'FORMAT_DATE',
+    'FORMAT_DATETIME',
+    'FORMAT_TIME',
+    'FORMAT_TIMESTAMP',
+    'FROM_BASE32',
+    'FROM_BASE64',
+    'FROM_HEX',
+    'GENERATE_ARRAY',
+    'GENERATE_DATE_ARRAY',
+    'GENERATE_RANGE_ARRAY',
+    'GENERATE_TIMESTAMP_ARRAY',
+    'GENERATE_UUID',
+    'GREATEST',
+    'GROUPING',
+    'HLL_COUNT.EXTRACT',
+    'HLL_COUNT.INIT',
+    'HLL_COUNT.MERGE',
+    'HLL_COUNT.MERGE_PARTIAL',
+    'IEEE_DIVIDE',
+    'IF',
+    'IFERROR',
+    'IFNULL',
+    'IN UNNEST',
+    'INITCAP',
+    'INIT_FOR_DP_APPROX_COUNT_DISTINCT',
+    'INSTR',
+    'INT64',
+    'INT64_ARRAY',
+    'IS DESTINATION OF',
+    'IS DISTINCT FROM',
+    'IS NOT DISTINCT FROM',
+    'IS SOURCE OF',
+    'ISERROR',
+    'IS_ACYCLIC',
+    'IS_INF',
+    'IS_NAN',
+    'IS_SIMPLE',
+    'IS_TRAIL',
+    'JSON_ARRAY',
+    'JSON_ARRAY_APPEND',
+    'JSON_ARRAY_INSERT',
+    'JSON_CONTAINS',
+    'JSON_EXTRACT',
+    'JSON_EXTRACT_ARRAY',
+    'JSON_EXTRACT_SCALAR',
+    'JSON_EXTRACT_STRING_ARRAY',
+    'JSON_KEYS',
+    'JSON_OBJECT',
+    'JSON_QUERY',
+    'JSON_QUERY_ARRAY',
+    'JSON_REMOVE',
+    'JSON_SET',
+    'JSON_STRIP_NULLS',
+    'JSON_TYPE',
+    'JSON_VALUE',
+    'JSON_VALUE_ARRAY',
+    'JUSTIFY_DAYS',
+    'JUSTIFY_HOURS',
+    'JUSTIFY_INTERVAL',
+    'KEYS.ADD_KEY_FROM_RAW_BYTES',
+    'KEYS.KEYSET_CHAIN',
+    'KEYS.KEYSET_FROM_JSON',
+    'KEYS.KEYSET_LENGTH',
+    'KEYS.KEYSET_TO_JSON',
+    'KEYS.NEW_KEYSET',
+    'KEYS.NEW_WRAPPED_KEYSET',
+    'KEYS.REWRAP_KEYSET',
+    'KEYS.ROTATE_KEYSET',
+    'KEYS.ROTATE_WRAPPED_KEYSET',
+    'KLL_QUANTILES.EXTRACT_FLOAT64',
+    'KLL_QUANTILES.EXTRACT_INT64',
+    'KLL_QUANTILES.EXTRACT_POINT_FLOAT64',
+    'KLL_QUANTILES.EXTRACT_POINT_INT64',
+    'KLL_QUANTILES.INIT_FLOAT64',
+    'KLL_QUANTILES.INIT_INT64',
+    'KLL_QUANTILES.MERGE_FLOAT64',
+    'KLL_QUANTILES.MERGE_INT64',
+    'KLL_QUANTILES.MERGE_PARTIAL',
+    'KLL_QUANTILES.MERGE_POINT_FLOAT64',
+    'KLL_QUANTILES.MERGE_POINT_INT64',
+    'L1_NORM',
+    'L2_NORM',
+    'LABELS',
+    'LAG',
+    'LAST_DAY',
+    'LAST_VALUE',
+    'LAX_BOOL',
+    'LAX_BOOL_ARRAY',
+    'LAX_FLOAT32',
+    'LAX_FLOAT32_ARRAY',
+    'LAX_FLOAT64',
+    'LAX_FLOAT64_ARRAY',
+    'LAX_INT64',
+    'LAX_INT64_ARRAY',
+    'LAX_STRING',
+    'LAX_STRING_ARRAY',
+    'LEAD',
+    'LEAST',
+    'LEFT',
+    'LENGTH',
+    'LIKE ALL',
+    'LIKE ALL UNNEST',
+    'LIKE ANY',
+    'LIKE ANY UNNEST',
+    'LN',
+    'LOG',
+    'LOG10',
+    'LOGICAL_AND',
+    'LOGICAL_OR',
+    'LOWER',
+    'LPAD',
+    'LTRIM',
+    'MAKE_INTERVAL',
+    'MANHATTAN_DISTANCE',
+    'MAP_CARDINALITY',
+    'MAP_CONTAINS_KEY',
+    'MAP_DELETE',
+    'MAP_EMPTY',
+    'MAP_ENTRIES_SORTED',
+    'MAP_ENTRIES_UNSORTED',
+    'MAP_FILTER',
+    'MAP_FROM_ARRAY',
+    'MAP_GET',
+    'MAP_INSERT',
+    'MAP_INSERT_OR_REPLACE',
+    'MAP_KEYS_SORTED',
+    'MAP_KEYS_UNSORTED',
+    'MAP_REPLACE',
+    'MAP_VALUES_SORTED',
+    'MAP_VALUES_SORTED_BY_KEY',
+    'MAP_VALUES_UNSORTED',
+    'MAX',
+    'MD5',
+    'MERGE_PARTIAL_FOR_DP_APPROX_COUNT_DISTINCT',
+    'MIN',
+    'MOD',
+    'NET.HOST',
+    'NET.IPV4_FROM_INT64',
+    'NET.IPV4_TO_INT64',
+    'NET.IP_FROM_STRING',
+    'NET.IP_NET_MASK',
+    'NET.IP_TO_STRING',
+    'NET.IP_TRUNC',
+    'NET.PUBLIC_SUFFIX',
+    'NET.REG_DOMAIN',
+    'NET.SAFE_IP_FROM_STRING',
+    'NEW_UUID',
+    'NODES',
+    'NORMALIZE',
+    'NORMALIZE_AND_CASEFOLD',
+    'NOT LIKE ALL',
+    'NOT LIKE ALL UNNEST',
+    'NOT LIKE ANY',
+    'NOT LIKE ANY UNNEST',
+    'NTH_VALUE',
+    'NTILE',
+    'NULLIF',
+    'NULLIFERROR',
+    'NULLIFZERO',
+    'OCTET_LENGTH',
+    'OFFSET',
+    'ORDINAL',
+    'PARSE_BIGNUMERIC',
+    'PARSE_DATE',
+    'PARSE_DATETIME',
+    'PARSE_JSON',
+    'PARSE_NUMERIC',
+    'PARSE_TIME',
+    'PARSE_TIMESTAMP',
+    'PATH',
+    'PATH_FIRST',
+    'PATH_LAST',
+    'PATH_LENGTH',
+    'PERCENTILE_CONT',
+    'PERCENTILE_DISC',
+    'PERCENT_RANK',
+    'PI',
+    'PIVOT',
+    'PI_BIGNUMERIC',
+    'PI_NUMERIC',
+    'POW',
+    'POWER',
+    'PROPERTY_EXISTS',
+    'PROPERTY_NAMES',
+    'PROTO_MAP_CONTAINS_KEY',
+    'PROTO_MODIFY_MAP',
+    'RAND',
+    'RANGE',
+    'RANGE_BUCKET',
+    'RANGE_CONTAINS',
+    'RANGE_END',
+    'RANGE_INTERSECT',
+    'RANGE_IS_END_UNBOUNDED',
+    'RANGE_IS_START_UNBOUNDED',
+    'RANGE_OVERLAPS',
+    'RANGE_START',
+    'RANK',
+    'REGEXP_CONTAINS',
+    'REGEXP_EXTRACT',
+    'REGEXP_EXTRACT_ALL',
+    'REGEXP_INSTR',
+    'REGEXP_REPLACE',
+    'REGEXP_SUBSTR',
+    'REPEAT',
+    'REPLACE',
+    'REVERSE',
+    'RIGHT',
+    'ROUND',
+    'ROW_NUMBER',
+    'RPAD',
+    'RTRIM',
+    'S2_CELLIDFROMPOINT',
+    'S2_COVERINGCELLIDS',
+    'SAFE_ADD',
+    'SAFE_CONVERT_BYTES_TO_STRING',
+    'SAFE_DIVIDE',
+    'SAFE_MULTIPLY',
+    'SAFE_NEGATE',
+    'SAFE_OFFSET',
+    'SAFE_ORDINAL',
+    'SAFE_SUBTRACT',
+    'SAFE_TO_JSON',
+    'SAME',
+    'SEC',
+    'SECH',
+    'SESSION_USER',
+    'SHA1',
+    'SHA256',
+    'SHA512',
+    'SIGN',
+    'SIN',
+    'SINH',
+    'SOUNDEX',
+    'SOURCE_NODE_ID',
+    'SPLIT',
+    'SPLIT_SUBSTR',
+    'SQRT',
+    'STARTS_WITH',
+    'STDDEV',
+    'STDDEV_POP',
+    'STDDEV_SAMP',
+    'STRING',
+    'STRING_AGG',
+    'STRING_ARRAY',
+    'STRPOS',
+    'ST_ANGLE',
+    'ST_AREA',
+    'ST_ASBINARY',
+    'ST_ASGEOJSON',
+    'ST_ASKML',
+    'ST_ASTEXT',
+    'ST_AZIMUTH',
+    'ST_BOUNDARY',
+    'ST_BOUNDINGBOX',
+    'ST_BUFFER',
+    'ST_BUFFERWITHTOLERANCE',
+    'ST_CENTROID',
+    'ST_CENTROID_AGG',
+    'ST_CLOSESTPOINT',
+    'ST_CLUSTERDBSCAN',
+    'ST_CONTAINS',
+    'ST_CONVEXHULL',
+    'ST_COVEREDBY',
+    'ST_COVERS',
+    'ST_DIFFERENCE',
+    'ST_DIMENSION',
+    'ST_DISJOINT',
+    'ST_DISTANCE',
+    'ST_DUMP',
+    'ST_DUMPPOINTS',
+    'ST_DWITHIN',
+    'ST_ENDPOINT',
+    'ST_EQUALS',
+    'ST_EXTENT',
+    'ST_EXTERIORRING',
+    'ST_GEOGFROM',
+    'ST_GEOGFROMGEOJSON',
+    'ST_GEOGFROMKML',
+    'ST_GEOGFROMTEXT',
+    'ST_GEOGFROMWKB',
+    'ST_GEOGPOINT',
+    'ST_GEOGPOINTFROMGEOHASH',
+    'ST_GEOHASH',
+    'ST_GEOMETRYTYPE',
+    'ST_HAUSDORFFDISTANCE',
+    'ST_HAUSDORFFDWITHIN',
+    'ST_INTERIORRINGS',
+    'ST_INTERSECTION',
+    'ST_INTERSECTS',
+    'ST_INTERSECTSBOX',
+    'ST_ISCLOSED',
+    'ST_ISCOLLECTION',
+    'ST_ISEMPTY',
+    'ST_ISRING',
+    'ST_LENGTH',
+    'ST_LINEINTERPOLATEPOINT',
+    'ST_LINELOCATEPOINT',
+    'ST_LINESUBSTRING',
+    'ST_MAKELINE',
+    'ST_MAKEPOLYGON',
+    'ST_MAKEPOLYGONORIENTED',
+    'ST_MAXDISTANCE',
+    'ST_NEAREST_NEIGHBORS',
+    'ST_NPOINTS',
+    'ST_NUMGEOMETRIES',
+    'ST_NUMPOINTS',
+    'ST_PERIMETER',
+    'ST_POINTN',
+    'ST_SIMPLIFY',
+    'ST_SNAPTOGRID',
+    'ST_STARTPOINT',
+    'ST_TOUCHES',
+    'ST_UNARYUNION',
+    'ST_UNION',
+    'ST_UNION_AGG',
+    'ST_WITHIN',
+    'ST_X',
+    'ST_Y',
+    'SUBSTR',
+    'SUBSTRING',
+    'SUM',
+    'TAN',
+    'TANH',
+    'TIME',
+    'TIMESTAMP',
+    'TIMESTAMP_ADD',
+    'TIMESTAMP_BUCKET',
+    'TIMESTAMP_DIFF',
+    'TIMESTAMP_FROM_UNIX_MICROS',
+    'TIMESTAMP_FROM_UNIX_MILLIS',
+    'TIMESTAMP_FROM_UNIX_SECONDS',
+    'TIMESTAMP_MICROS',
+    'TIMESTAMP_MILLIS',
+    'TIMESTAMP_SECONDS',
+    'TIMESTAMP_SUB',
+    'TIMESTAMP_TRUNC',
+    'TIME_ADD',
+    'TIME_DIFF',
+    'TIME_SUB',
+    'TIME_TRUNC',
+    'TO_BASE32',
+    'TO_BASE64',
+    'TO_CODE_POINTS',
+    'TO_HEX',
+    'TO_JSON',
+    'TO_JSON_STRING',
+    'TRANSLATE',
+    'TRIM',
+    'TRUNC',
+    'TYPEOF',
+    'UNICODE',
+    'UNIX_DATE',
+    'UNIX_MICROS',
+    'UNIX_MILLIS',
+    'UNIX_SECONDS',
+    'UNNEST',
+    'UNPIVOT',
+    'UPPER',
+    'VARIANCE',
+    'VAR_POP',
+    'VAR_SAMP',
+    'ZEROIFNULL',
+]
+
+keywords = [
+    'ABORT',
+    'ACCESS',
+    'ACTION',
+    'ACYCLIC',
+    'ADD',
+    'AFTER',
+    'AGGREGATE',
+    'ALL',
+    'ALTER',
+    'ALWAYS',
+    'ANALYZE',
+    'AND',
+    'ANY',
+    'APPROX',
+    'ARE',
+    'AS',
+    'ASC',
+    'ASCENDING',
+    'ASSERT',
+    'ASSERT_ROWS_MODIFIED',
+    'AT',
+    'BATCH',
+    'BEGIN',
+    'BETWEEN',
+    'BIGDECIMAL',
+    'BREAK',
+    'BY',
+    'CALL',
+    'CASCADE',
+    'CASE',
+    'CAST',
+    'CHECK',
+    'CLAMPED',
+    'CLONE',
+    'CLUSTER',
+    'COLLATE',
+    'COLUMN',
+    'COLUMNS',
+    'COMMIT',
+    'CONFLICT',
+    'CONNECTION',
+    'CONSTANT',
+    'CONSTRAINT',
+    'CONTAINS',
+    'CONTINUE',
+    'COPY',
+    'CORRESPONDING',
+    'CREATE',
+    'CROSS',
+    'CUBE',
+    'CURRENT',
+    'CYCLE',
+    'DATA',
+    'DATABASE',
+    'DAY',
+    'DAYOFWEEK',
+    'DAYOFYEAR',
+    'DECIMAL',
+    'DECLARE',
+    'DEFAULT',
+    'DEFINE',
+    'DEFINER',
+    'DELETE',
+    'DELETION',
+    'DEPTH',
+    'DESC',
+    'DESCENDING',
+    'DESCRIBE',
+    'DESCRIPTOR',
+    'DESTINATION',
+    'DETERMINISTIC',
+    'DISTINCT',
+    'DO',
+    'DROP',
+    'EDGE',
+    'ELSE',
+    'ELSEIF',
+    'END',
+    'ENFORCED',
+    'ERROR',
+    'ESCAPE',
+    'EXCEPT',
+    'EXCEPTION',
+    'EXCLUDE',
+    'EXECUTE',
+    'EXISTS',
+    'EXPLAIN',
+    'EXPORT',
+    'EXTEND',
+    'EXTERNAL',
+    'EXTRACT',
+    'FALSE',
+    'FETCH',
+    'FIELD',
+    'FILES',
+    'FILL',
+    'FILTER',
+    'FIRST',
+    'FOLLOWING',
+    'FOR',
+    'FOREIGN',
+    'FORK',
+    'FORMAT',
+    'FRIDAY',
+    'FROM',
+    'FULL',
+    'FUNCTION',
+    'GENERATED',
+    'GRANT',
+    'GRAPH',
+    'GRAPH_TABLE',
+    'GROUP',
+    'GROUPING',
+    'GROUPS',
+    'GROUP_ROWS',
+    'HAS',
+    'HASH',
+    'HAVING',
+    'HIDDEN',
+    'HOUR',
+    'IDENTITY',
+    'IF',
+    'IGNORE',
+    'IMMEDIATE',
+    'IMMUTABLE',
+    'IMPORT',
+    'IN',
+    'INCLUDE',
+    'INCREMENT',
+    'INDEX',
+    'INNER',
+    'INOUT',
+    'INPUT',
+    'INSERT',
+    'INTERLEAVE',
+    'INTERSECT',
+    'INTO',
+    'INVOKER',
+    'IS',
+    'ISOLATION',
+    'ISOWEEK ',
+    'ISOYEAR',
+    'ITERATE',
+    'JOIN',
+    'KEY',
+    'LABEL',
+    'LABELED',
+    'LANGUAGE',
+    'LAST',
+    'LATERAL',
+    'LEAVE',
+    'LEFT',
+    'LET',
+    'LEVEL',
+    'LIKE',
+    'LIMIT',
+    'LOAD',
+    'LOG',
+    'LOOKUP',
+    'LOOP',
+    'MACRO',
+    'MATCH',
+    'MATCHED',
+    'MATCH_RECOGNIZE',
+    'MATERIALIZED',
+    'MAX',
+    'MAXVALUE',
+    'MEASURES',
+    'MERGE',
+    'MESSAGE',
+    'METADATA',
+    'MICROSECOND',
+    'MILLISECOND',
+    'MIN',
+    'MINUTE',
+    'MINVALUE',
+    'MODEL',
+    'MODULE',
+    'MONDAY',
+    'MONTH',
+    'NAME',
+    'NANOSECOND',
+    'NATURAL',
+    'NEW',
+    'NEXT',
+    'NO',
+    'NODE',
+    'NOT',
+    'NOTHING',
+    'NULL',
+    'NULLS',
+    'NULL_FILTERED',
+    'OF',
+    'OFFSET',
+    'ON',
+    'ONEOF_CASE',
+    'ONLY',
+    'OPTIONAL',
+    'OPTIONS',
+    'OR',
+    'ORDER',
+    'OUT',
+    'OUTER',
+    'OUTPUT',
+    'OVER',
+    'OVERWRITE',
+    'PARENT',
+    'PARTITION',
+    'PARTITIONS',
+    'PAST',
+    'PATH',
+    'PATHS',
+    'PATTERN',
+    'PERCENT',
+    'PIVOT',
+    'POLICIES',
+    'POLICY',
+    'PRECEDING',
+    'PRIMARY',
+    'PRIVATE',
+    'PRIVILEGE',
+    'PRIVILEGES',
+    'PROCEDURE',
+    'PROJECT',
+    'PROPERTIES',
+    'PROPERTY',
+    'PUBLIC',
+    'QUALIFY',
+    'QUARTER',
+    'RAISE',
+    'RAW',
+    'READ',
+    'RECURSIVE',
+    'REFERENCES',
+    'REMOTE',
+    'REMOVE',
+    'RENAME',
+    'REPEAT',
+    'REPEATABLE',
+    'REPLACE',
+    'REPLACE_FIELDS',
+    'REPLICA',
+    'REPORT',
+    'RESPECT',
+    'RESTRICT',
+    'RESTRICTION',
+    'RETURN',
+    'RETURNS',
+    'REVOKE',
+    'RIGHT',
+    'ROLLBACK',
+    'ROLLUP',
+    'ROW',
+    'ROWS',
+    'RUN',
+    'SAFE_CAST',
+    'SATURDAY',
+    'SCHEMA',
+    'SEARCH',
+    'SECOND ',
+    'SECURITY',
+    'SELECT',
+    'SEQUENCE',
+    'SET',
+    'SETS',
+    'SHORTEST',
+    'SHOW',
+    'SIMPLE',
+    'SKIP',
+    'SNAPSHOT',
+    'SOME',
+    'SOURCE',
+    'SQL',
+    'STABLE',
+    'START',
+    'STATIC_DESCRIBE',
+    'STORED',
+    'STORING',
+    'STRICT',
+    'SUNDAY',
+    'SYSTEM',
+    'SYSTEM_TIME',
+    'TABLE',
+    'TABLES',
+    'TABLESAMPLE',
+    'TARGET',
+    'TEMP',
+    'TEMPORARY',
+    'THEN',
+    'THURSDAY',
+    'TO',
+    'TRAIL',
+    'TRANSACTION',
+    'TRANSFORM',
+    'TREAT',
+    'TRUE',
+    'TRUNCATE',
+    'TUESDAY',
+    'TYPE',
+    'UNBOUNDED',
+    'UNDROP',
+    'UNION',
+    'UNIQUE',
+    'UNKNOWN',
+    'UNNEST',
+    'UNPIVOT',
+    'UNTIL',
+    'UPDATE',
+    'USING',
+    'VALUE',
+    'VALUES',
+    'VECTOR',
+    'VIEW',
+    'VIEWS',
+    'VOLATILE',
+    'WALK',
+    'WEDNESDAY',
+    'WEEK',
+    'WEIGHT',
+    'WHEN',
+    'WHERE',
+    'WHILE',
+    'WINDOW',
+    'WITH',
+    'WITHIN',
+    'WRITE',
+    'YEAR',
+    'ZONE',
+]
+
+operators = [
+    '!=',
+    '&',
+    '*',
+    '+',
+    '-',
+    '/',
+    '<',
+    '<<',
+    '<=',
+    '=',
+    '>',
+    '>=',
+    '>>',
+    '^',
+    '|',
+    '||',
+    '~',
+]
+
+types = [
+    'ARRAY',
+    'BIGNUMERIC',
+    'BOOL',
+    'BYTES',
+    'DATE',
+    'DATETIME',
+    'DOUBLE',
+    'ENUM',
+    'EXTENDED',
+    'FLOAT',
+    'GEOGRAPHY',
+    'GRAPH_ELEMENT',
+    'GRAPH_PATH',
+    'INT32',
+    'INT64',
+    'INTERVAL',
+    'JSON',
+    'MAP',
+    'MEASURE',
+    'NUMERIC',
+    'PROTO',
+    'RANGE',
+    'STRING',
+    'STRUCT',
+    'TIME',
+    'TIMESTAMP',
+    'TIMESTAMP_PICOS',
+    'TOKENLIST',
+    'UINT32',
+    'UINT64',
+    'UUID',
+]
diff --git a/pygments/lexers/_mapping.py b/pygments/lexers/_mapping.py
index 69a1cb18..74ed6d3f 100644
--- a/pygments/lexers/_mapping.py
+++ b/pygments/lexers/_mapping.py
@@ -195,6 +195,7 @@ LEXERS = {
     'GoLexer': ('pygments.lexers.go', 'Go', ('go', 'golang'), ('*.go',), ('text/x-gosrc',)),
     'GoloLexer': ('pygments.lexers.jvm', 'Golo', ('golo',), ('*.golo',), ()),
     'GoodDataCLLexer': ('pygments.lexers.business', 'GoodData-CL', ('gooddata-cl',), ('*.gdc',), ('text/x-gooddata-cl',)),
+    'GoogleSqlLexer': ('pygments.lexers.sql', 'GoogleSQL', ('googlesql', 'zetasql'), ('*.googlesql', '*.googlesql.sql'), ('text/x-google-sql', 'text/x-google-sql-aux')),
     'GosuLexer': ('pygments.lexers.jvm', 'Gosu', ('gosu',), ('*.gs', '*.gsx', '*.gsp', '*.vark'), ('text/x-gosu',)),
     'GosuTemplateLexer': ('pygments.lexers.jvm', 'Gosu Template', ('gst',), ('*.gst',), ('text/x-gosu-template',)),
     'GraphQLLexer': ('pygments.lexers.graphql', 'GraphQL', ('graphql',), ('*.graphql',), ()),
@@ -206,6 +207,7 @@ LEXERS = {
     'HamlLexer': ('pygments.lexers.html', 'Haml', ('haml',), ('*.haml',), ('text/x-haml',)),
     'HandlebarsHtmlLexer': ('pygments.lexers.templates', 'HTML+Handlebars', ('html+handlebars',), ('*.handlebars', '*.hbs'), ('text/html+handlebars', 'text/x-handlebars-template')),
     'HandlebarsLexer': ('pygments.lexers.templates', 'Handlebars', ('handlebars',), (), ()),
+    'HareLexer': ('pygments.lexers.hare', 'Hare', ('hare',), ('*.ha',), ('text/x-hare',)),
     'HaskellLexer': ('pygments.lexers.haskell', 'Haskell', ('haskell', 'hs'), ('*.hs',), ('text/x-haskell',)),
     'HaxeLexer': ('pygments.lexers.haxe', 'Haxe', ('haxe', 'hxsl', 'hx'), ('*.hx', '*.hxsl'), ('text/haxe', 'text/x-haxe', 'text/x-hx')),
     'HexdumpLexer': ('pygments.lexers.hexdump', 'Hexdump', ('hexdump',), (), ()),
@@ -375,6 +377,7 @@ LEXERS = {
     'PanLexer': ('pygments.lexers.dsls', 'Pan', ('pan',), ('*.pan',), ()),
     'ParaSailLexer': ('pygments.lexers.parasail', 'ParaSail', ('parasail',), ('*.psi', '*.psl'), ('text/x-parasail',)),
     'PawnLexer': ('pygments.lexers.pawn', 'Pawn', ('pawn',), ('*.p', '*.pwn', '*.inc'), ('text/x-pawn',)),
+    'PddlLexer': ('pygments.lexers.pddl', 'PDDL', ('pddl',), ('*.pddl',), ()),
     'PegLexer': ('pygments.lexers.grammar_notation', 'PEG', ('peg',), ('*.peg',), ('text/x-peg',)),
     'Perl6Lexer': ('pygments.lexers.perl', 'Perl6', ('perl6', 'pl6', 'raku'), ('*.pl', '*.pm', '*.nqp', '*.p6', '*.6pl', '*.p6l', '*.pl6', '*.6pm', '*.p6m', '*.pm6', '*.t', '*.raku', '*.rakumod', '*.rakutest', '*.rakudoc'), ('text/x-perl6', 'application/x-perl6')),
     'PerlLexer': ('pygments.lexers.perl', 'Perl', ('perl', 'pl'), ('*.pl', '*.pm', '*.t', '*.perl'), ('text/x-perl', 'application/x-perl')),
@@ -437,6 +440,7 @@ LEXERS = {
     'RedLexer': ('pygments.lexers.rebol', 'Red', ('red', 'red/system'), ('*.red', '*.reds'), ('text/x-red', 'text/x-red-system')),
     'RedcodeLexer': ('pygments.lexers.esoteric', 'Redcode', ('redcode',), ('*.cw',), ()),
     'RegeditLexer': ('pygments.lexers.configs', 'reg', ('registry',), ('*.reg',), ('text/x-windows-registry',)),
+    'RegoLexer': ('pygments.lexers.rego', 'Rego', ('rego',), ('*.rego',), ('text/x-rego',)),
     'ResourceLexer': ('pygments.lexers.resource', 'ResourceBundle', ('resourcebundle', 'resource'), (), ()),
     'RexxLexer': ('pygments.lexers.scripting', 'Rexx', ('rexx', 'arexx'), ('*.rexx', '*.rex', '*.rx', '*.arexx'), ('text/x-rexx',)),
     'RhtmlLexer': ('pygments.lexers.templates', 'RHTML', ('rhtml', 'html+erb', 'html+ruby'), ('*.rhtml',), ('text/html+ruby',)),
@@ -561,6 +565,7 @@ LEXERS = {
     'VimLexer': ('pygments.lexers.textedit', 'VimL', ('vim',), ('*.vim', '.vimrc', '.exrc', '.gvimrc', '_vimrc', '_exrc', '_gvimrc', 'vimrc', 'gvimrc'), ('text/x-vim',)),
     'VisualPrologGrammarLexer': ('pygments.lexers.vip', 'Visual Prolog Grammar', ('visualprologgrammar',), ('*.vipgrm',), ()),
     'VisualPrologLexer': ('pygments.lexers.vip', 'Visual Prolog', ('visualprolog',), ('*.pro', '*.cl', '*.i', '*.pack', '*.ph'), ()),
+    'VueLexer': ('pygments.lexers.html', 'Vue', ('vue',), ('*.vue',), ()),
     'VyperLexer': ('pygments.lexers.vyper', 'Vyper', ('vyper',), ('*.vy',), ()),
     'WDiffLexer': ('pygments.lexers.diff', 'WDiff', ('wdiff',), ('*.wdiff',), ()),
     'WatLexer': ('pygments.lexers.webassembly', 'WebAssembly', ('wast', 'wat'), ('*.wat', '*.wast'), ()),
diff --git a/pygments/lexers/bqn.py b/pygments/lexers/bqn.py
index b0794ee0..0a815a04 100644
--- a/pygments/lexers/bqn.py
+++ b/pygments/lexers/bqn.py
@@ -26,6 +26,10 @@ class BQNLexer(RegexLexer):
     mimetypes = []
     version_added = '2.16'
 
+    # An inter_word_char. Necessary because \w matches all alphanumeric
+    # Unicode characters, including ones (e.g., 𝕊) that BQN treats special.
+    _iwc = r'((?=[^𝕎𝕏𝔽𝔾𝕊𝕨𝕩𝕗𝕘𝕤𝕣])\w)'
+
     tokens = {
         'root': [
             # Whitespace
@@ -57,34 +61,35 @@ class BQNLexer(RegexLexer):
             # ===================
             # Since this token type is important in BQN, it is not included in
             # the punctuation token type but rather in the following one
-            (r'[\(\)]', String.Regex), 
+            (r'[\(\)]', String.Regex),
             #
             # Numbers
             # =======
             # Includes the numeric literals and the Nothing character
-            (r'¯?([0-9]+\.?[0-9]+|[0-9]+)([Ee][¯]?[0-9]+)?|¯|∞|π|·', Number),
+            (r'¯?[0-9](([0-9]|_)*\.?([0-9]|_)+|([0-9]|_)*)([Ee][¯]?([0-9]|_)+)?|¯|∞|π|·', Number),
             #
             # Variables
             # =========
-            (r'\b[a-z]\w*\b', Name.Variable),
-            #
-            # 1-Modifiers
-            # ===========
-            (r'[˙˜˘¨⌜⁼´˝`𝕣]', Name.Attribute),
-            (r'\b_[a-zA-Z0-9]+\b', Name.Attribute),
+            (r'[a-z]' + _iwc + r'*', Name.Variable),
             #
             # 2-Modifiers
             # ===========
+            # Needs to come before the 1-modifiers due to _𝕣 and _𝕣_
             (r'[∘○⊸⟜⌾⊘◶⎉⚇⍟⎊]', Name.Property),
-            (r'\b_[a-zA-Z0-9]+_\b', Name.Property),
+            (r'_(𝕣|[a-zA-Z0-9]+)_', Name.Property),
+            #
+            # 1-Modifiers
+            # ===========
+            (r'[˙˜˘¨⌜⁼´˝`𝕣]', Name.Attribute),
+            (r'_(𝕣|[a-zA-Z0-9]+)', Name.Attribute),
             #
             # Functions
             # =========
             # The monadic or dyadic function primitives and function
             # operands and arguments, along with function self-reference
-            (r'[+\-×÷\*√⌊⌈∧∨¬|≤<>≥=≠≡≢⊣⊢⥊∾≍⋈↑↓↕«»⌽⍉/⍋⍒⊏⊑⊐⊒∊⍷⊔!𝕎𝕏𝔽𝔾𝕊]',
+            (r'[+\-×÷\⋆√⌊⌈∧∨¬|≤<>≥=≠≡≢⊣⊢⥊∾≍⋈↑↓↕«»⌽⍉/⍋⍒⊏⊑⊐⊒∊⍷⊔!𝕎𝕏𝔽𝔾𝕊]',
              Operator),
-            (r'[A-Z]\w*|•\w+\b', Operator),
+            (r'[A-Z]' + _iwc + r'*|•' + _iwc + r'+', Operator),
             #
             # Constant
             # ========
@@ -102,8 +107,6 @@ class BQNLexer(RegexLexer):
             # ================
             (r'[;:?𝕨𝕩𝕗𝕘𝕤]', Name.Entity),
             #
-            
+
         ],
     }
-
-    
diff --git a/pygments/lexers/gleam.py b/pygments/lexers/gleam.py
index eba42a17..beae94a7 100644
--- a/pygments/lexers/gleam.py
+++ b/pygments/lexers/gleam.py
@@ -25,7 +25,7 @@ class GleamLexer(RegexLexer):
     filenames = ['*.gleam']
     aliases = ['gleam']
     mimetypes = ['text/x-gleam']
-    version_added = '2.18'
+    version_added = '2.19'
 
     keywords = words((
         'as', 'assert', 'auto', 'case', 'const', 'delegate', 'derive', 'echo',
diff --git a/pygments/lexers/hare.py b/pygments/lexers/hare.py
new file mode 100644
index 00000000..5081176c
--- /dev/null
+++ b/pygments/lexers/hare.py
@@ -0,0 +1,73 @@
+"""
+    pygments.lexers.hare
+    ~~~~~~~~~~~~~~~~~~~~
+
+    Lexers for the Hare language.
+
+    :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
+    :license: BSD, see LICENSE for details.
+"""
+
+from pygments.lexer import RegexLexer, include, words
+from pygments.token import Comment, Operator, Keyword, Name, String, \
+    Number, Punctuation, Whitespace
+
+__all__ = ['HareLexer']
+
+class HareLexer(RegexLexer):
+    """
+    Lexer for the Hare programming language.
+    """
+    name = 'Hare'
+    url = 'https://harelang.org/'
+    aliases = ['hare']
+    filenames = ['*.ha']
+    mimetypes = ['text/x-hare']
+    version_added = '2.19'
+
+    _ws = r'(?:\s|//.*?\n|/[*].*?[*]/)+'
+    _ws1 = r'\s*(?:/[*].*?[*]/\s*)?'
+
+    tokens = {
+        'whitespace': [
+            (r'^use.*;', Comment.Preproc),
+            (r'@[a-z]+', Comment.Preproc),
+            (r'\n', Whitespace),
+            (r'\s+', Whitespace),
+            (r'//.*?$', Comment.Single),
+        ],
+        'statements': [
+            (r'"', String, 'string'),
+            (r'`[^`]*`', String),
+            (r"'(\\.|\\[0-7]{1,3}|\\x[a-fA-F0-9]{1,2}|[^\\\'\n])'", String.Char),
+            (r'(\d+\.\d*|\.\d+|\d+)[eE][+-]?\d+[LlUu]*', Number.Float),
+            (r'(\d+\.\d*|\.\d+|\d+[fF])[fF]?', Number.Float),
+            (r'0x[0-9a-fA-F]+[LlUu]*', Number.Hex),
+            (r'0o[0-7]+[LlUu]*', Number.Oct),
+            (r'\d+[zui]?(\d+)?', Number.Integer),
+            (r'[~!%^&*+=|?:<>/-]', Operator),
+            (words(('as', 'is', '=>', '..', '...')), Operator),
+            (r'[()\[\],.{};]+', Punctuation),
+            (words(('abort', 'align', 'alloc', 'append', 'assert', 'case',
+                'const', 'def', 'defer', 'delete', 'else', 'enum', 'export',
+                'fn', 'for', 'free', 'if', 'let', 'len', 'match', 'offset',
+                'return', 'static', 'struct', 'switch', 'type', 'union',
+                'yield', 'vastart', 'vaarg', 'vaend'),
+                suffix=r'\b'), Keyword),
+            (r'(bool|int|uint|uintptr|u8|u16|u32|u64|i8|i16|i32|i64|f32|f64|null|done|never|void|nullable|rune|size|valist)\b',
+             Keyword.Type),
+            (r'(true|false|null)\b', Name.Builtin),
+            (r'[a-zA-Z_]\w*', Name),
+        ],
+        'string': [
+            (r'"', String, '#pop'),
+            (r'\\([\\abfnrtv"\']|x[a-fA-F0-9]{2,4}|'
+             r'u[a-fA-F0-9]{4}|U[a-fA-F0-9]{8}|[0-7]{1,3})', String.Escape),
+            (r'[^\\"\n]+', String),  # all other characters
+            (r'\\', String),  # stray backslash
+        ],
+        'root': [
+            include('whitespace'),
+            include('statements'),
+        ],
+    }
diff --git a/pygments/lexers/html.py b/pygments/lexers/html.py
index c4217a21..97460658 100644
--- a/pygments/lexers/html.py
+++ b/pygments/lexers/html.py
@@ -11,7 +11,7 @@
 import re
 
 from pygments.lexer import RegexLexer, ExtendedRegexLexer, include, bygroups, \
-    default, using
+    default, using, inherit, this
 from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
     Punctuation, Whitespace
 from pygments.util import looks_like_xml, html_doctype_matches
@@ -22,7 +22,7 @@ from pygments.lexers.css import CssLexer, _indentation, _starts_block
 from pygments.lexers.ruby import RubyLexer
 
 __all__ = ['HtmlLexer', 'DtdLexer', 'XmlLexer', 'XsltLexer', 'HamlLexer',
-           'ScamlLexer', 'PugLexer', 'UrlEncodedLexer']
+           'ScamlLexer', 'PugLexer', 'VueLexer', 'UrlEncodedLexer']
 
 
 class HtmlLexer(RegexLexer):
@@ -624,3 +624,46 @@ class UrlEncodedLexer(RegexLexer):
             ('([^&=]*)(=)([^=&]*)(&?)', bygroups(Name.Tag, Operator, String, Punctuation)),
         ],
     }
+    
+
+class VueLexer(HtmlLexer):
+    """
+    For Vue Single-File Component.
+    """
+
+    name = 'Vue'
+    url = 'https://vuejs.org/api/sfc-spec.html'
+    aliases = ['vue']
+    filenames = ['*.vue']
+    mimetypes = []
+
+    flags = re.IGNORECASE | re.DOTALL
+    tokens = {
+        'root': [
+            (r'(\{\{)(.*?)(\}\})', bygroups(Comment.Preproc,
+             using(JavascriptLexer), Comment.Preproc)),
+            ('[^<&{]+', Text),
+            inherit,
+        ],
+        'tag': [
+            (r'\s+', Text),
+            (r'((?:[@:]|v-)(?:[.\w:-]|\[[^\]]*?\])+\s*)(=)(\s*)',
+             bygroups(using(this, state=['name']), Operator, Text),
+             'attr-directive'),
+            (r'([\w:-]+\s*)(=)(\s*)', bygroups(Name.Attribute, Operator, Text),
+             'attr'),
+            (r'[\w:-]+', Name.Attribute),
+            (r'(/?)(\s*)(>)', bygroups(Punctuation, Text, Punctuation), '#pop'),
+        ],
+        'name': [
+            (r'[\w-]+', Name.Attribute),
+            (r'[:@.]', Punctuation),
+            (r'(\[)([^\]]*?)(\])', bygroups(Comment.Preproc,
+             using(JavascriptLexer), Comment.Preproc)),
+        ],
+        'attr-directive': [
+            (r'(["\'])(.*?)(\1)', bygroups(String,
+             using(JavascriptLexer), String), '#pop'),
+            (r'[^\s>]+', using(JavascriptLexer), '#pop'),
+        ],
+    }
diff --git a/pygments/lexers/pddl.py b/pygments/lexers/pddl.py
new file mode 100644
index 00000000..ae978444
--- /dev/null
+++ b/pygments/lexers/pddl.py
@@ -0,0 +1,82 @@
+"""
+    pygments.lexers.pddl
+    ~~~~~~~~~~~~~~~~~~~~
+
+    Lexer for the Planning Domain Definition Language.
+
+    :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
+    :license: BSD, see LICENSE for details.
+"""
+
+
+from pygments.lexer import RegexLexer, words, include
+from pygments.token import Punctuation, Keyword, Whitespace, Name, Comment, \
+    Operator, Number
+
+
+__all__ = ['PddlLexer']
+
+
+class PddlLexer(RegexLexer):
+    """
+    A PDDL lexer.
+
+    It should support up to PDDL 3.1.
+    """
+
+    name = 'PDDL'
+    aliases = ['pddl']
+    filenames = ['*.pddl']
+    # there doesn't really seem to be a PDDL homepage.
+    url = 'https://en.wikipedia.org/wiki/Planning_Domain_Definition_Language'
+    version_added = '2.19'
+
+    tokens = {
+        'root': [
+            (r'\s+', Whitespace),
+            (r';.*$', Comment.Singleline),
+            include('keywords'),
+            include('builtins'),
+            (r'[()]', Punctuation),
+            (r'[=/*+><-]', Operator),
+            (r'[a-zA-Z][a-zA-Z0-9_-]*', Name),
+            (r'\?[a-zA-Z][a-zA-Z0-9_-]*', Name.Variable),
+            (r'[0-9]+\.[0-9]+', Number.Float),
+            (r'[0-9]+', Number.Integer),
+        ],
+        'keywords': [
+            (words((
+                ':requirements', ':types', ':constants',
+                ':predicates', ':functions', ':action', ':agent',
+                ':parameters', ':precondition', ':effect',
+                ':durative-action', ':duration', ':condition',
+                ':derived', ':domain', ':objects', ':init',
+                ':goal', ':metric', ':length', ':serial', ':parallel',
+                # the following are requirements
+                ':strips', ':typing', ':negative-preconditions',
+                ':disjunctive-preconditions', ':equality',
+                ':existential-preconditions', ':universal-preconditions',
+                ':conditional-effects', ':fluents', ':numeric-fluents',
+                ':object-fluents', ':adl', ':durative-actions',
+                ':continuous-effects', ':derived-predicates',
+                ':time-intial-literals', ':preferences',
+                ':constraints', ':action-costs', ':multi-agent',
+                ':unfactored-privacy', ':factored-privacy',
+                ':non-deterministic'
+                ), suffix=r'\b'), Keyword)
+        ],
+        'builtins': [
+            (words((
+                'define', 'domain', 'object', 'either', 'and',
+                'forall', 'preference', 'imply', 'or', 'exists',
+                'not', 'when', 'assign', 'scale-up', 'scale-down',
+                'increase', 'decrease', 'at', 'over', 'start',
+                'end', 'all', 'problem', 'always', 'sometime',
+                'within', 'at-most-once', 'sometime-after',
+                'sometime-before', 'always-within', 'hold-during',
+                'hold-after', 'minimize', 'maximize',
+                'total-time', 'is-violated'), suffix=r'\b'),
+                Name.Builtin)
+        ]
+    }
+
diff --git a/pygments/lexers/rego.py b/pygments/lexers/rego.py
new file mode 100644
index 00000000..fdc676f6
--- /dev/null
+++ b/pygments/lexers/rego.py
@@ -0,0 +1,57 @@
+"""
+    pygments.lexers.rego
+    ~~~~~~~~~~~~~~~~~~~~
+
+    Lexers for the Rego policy languages.
+
+    :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
+    :license: BSD, see LICENSE for details.
+"""
+
+from pygments.lexer import RegexLexer, words
+from pygments.token import Comment, Operator, Keyword, Name, String, Number, Punctuation, Whitespace
+
+class RegoLexer(RegexLexer):
+    """
+    For Rego source.
+    """
+    name = 'Rego'
+    url = 'https://www.openpolicyagent.org/docs/latest/policy-language/'
+    filenames = ['*.rego']
+    aliases = ['rego']
+    mimetypes = ['text/x-rego']
+    version_added = '2.19'
+
+    reserved_words = (
+        'as', 'contains', 'data', 'default', 'else', 'every', 'false',
+        'if', 'in', 'import', 'package', 'not', 'null',
+        'some', 'true', 'with'
+    )
+
+    builtins = (
+        # https://www.openpolicyagent.org/docs/latest/philosophy/#the-opa-document-model
+        'data',  # Global variable for accessing base and virtual documents
+        'input', # Represents synchronously pushed base documents
+    )
+
+    tokens = {
+        'root': [
+            (r'\n', Whitespace),
+            (r'\s+', Whitespace),
+            (r'#.*?$', Comment.Single),
+            (words(reserved_words, suffix=r'\b'), Keyword),
+            (words(builtins, suffix=r'\b'), Name.Builtin),
+            (r'[a-zA-Z_][a-zA-Z0-9_]*', Name),
+            (r'"(\\\\|\\"|[^"])*"', String.Double),
+            (r'`[^`]*`', String.Backtick),
+            (r'-?\d+(\.\d+)?', Number),
+            (r'(==|!=|<=|>=|:=)', Operator),  # Compound operators
+            (r'[=<>+\-*/%&|]', Operator),     # Single-character operators
+            (r'[\[\]{}(),.:;]', Punctuation),
+        ]
+    }
+
+__all__ = ['RegoLexer']
+
+
+
diff --git a/pygments/lexers/scripting.py b/pygments/lexers/scripting.py
index d38387e0..8b7c4e55 100644
--- a/pygments/lexers/scripting.py
+++ b/pygments/lexers/scripting.py
@@ -21,6 +21,10 @@ __all__ = ['LuaLexer', 'LuauLexer', 'MoonScriptLexer', 'ChaiscriptLexer', 'LSLLe
            'EasytrieveLexer', 'JclLexer', 'MiniScriptLexer']
 
 
+def all_lua_builtins():
+    from pygments.lexers._lua_builtins import MODULES
+    return [w for values in MODULES.values() for w in values]
+
 class LuaLexer(RegexLexer):
     """
     For Lua source code.
@@ -66,7 +70,7 @@ class LuaLexer(RegexLexer):
         'ws': [
             (_comment_multiline, Comment.Multiline),
             (_comment_single, Comment.Single),
-            (_space, Text),
+            (_space, Whitespace),
         ],
         'base': [
             include('ws'),
@@ -93,12 +97,23 @@ class LuaLexer(RegexLexer):
 
             (r'(function)\b', Keyword.Reserved, 'funcname'),
 
-            (r'[A-Za-z_]\w*(\.[A-Za-z_]\w*)?', Name),
+            (words(all_lua_builtins(), suffix=r"\b"), Name.Builtin),
+            (fr'[A-Za-z_]\w*(?={_s}*[.:])', Name.Variable, 'varname'),
+            (fr'[A-Za-z_]\w*(?={_s}*\()', Name.Function),
+            (r'[A-Za-z_]\w*', Name.Variable),
 
             ("'", String.Single, combined('stringescape', 'sqs')),
             ('"', String.Double, combined('stringescape', 'dqs'))
         ],
 
+        'varname': [
+            include('ws'),
+            (r'[.:]', Punctuation),
+            (rf'{_name}(?={_s}*[.:])', Name.Property),
+            (rf'{_name}(?={_s}*\()', Name.Function, '#pop'),
+            (_name, Name.Property, '#pop'),
+        ],
+
         'funcname': [
             include('ws'),
             (r'[.:]', Punctuation),
@@ -151,16 +166,15 @@ class LuaLexer(RegexLexer):
     def get_tokens_unprocessed(self, text):
         for index, token, value in \
                 RegexLexer.get_tokens_unprocessed(self, text):
-            if token is Name:
-                if value in self._functions:
-                    yield index, Name.Builtin, value
-                    continue
-                elif '.' in value:
+            if token is Name.Builtin and value not in self._functions:
+                if '.' in value:
                     a, b = value.split('.')
                     yield index, Name, a
                     yield index + len(a), Punctuation, '.'
                     yield index + len(a) + 1, Name, b
-                    continue
+                else:
+                    yield index, Name, value
+                continue
             yield index, token, value
 
 def _luau_make_expression(should_pop, _s):
@@ -521,7 +535,8 @@ class MoonScriptLexer(LuaLexer):
             (r'(self)\b', Name.Builtin.Pseudo),
             (r'@@?([a-zA-Z_]\w*)?', Name.Variable.Class),
             (r'[A-Z]\w*', Name.Class),  # proper name
-            (r'[A-Za-z_]\w*(\.[A-Za-z_]\w*)?', Name),
+            (words(all_lua_builtins(), suffix=r"\b"), Name.Builtin),
+            (r'[A-Za-z_]\w*', Name),
             ("'", String.Single, combined('stringescape', 'sqs')),
             ('"', String.Double, combined('stringescape', 'dqs'))
         ],
diff --git a/pygments/lexers/sql.py b/pygments/lexers/sql.py
index 90165389..56a926d3 100644
--- a/pygments/lexers/sql.py
+++ b/pygments/lexers/sql.py
@@ -40,6 +40,7 @@
     :license: BSD, see LICENSE for details.
 """
 
+import collections
 import re
 
 from pygments.lexer import Lexer, RegexLexer, do_insertions, bygroups, words
@@ -56,12 +57,13 @@ from pygments.lexers._mysql_builtins import \
     MYSQL_KEYWORDS, \
     MYSQL_OPTIMIZER_HINTS
 
+from pygments.lexers import _googlesql_builtins
 from pygments.lexers import _tsql_builtins
 
 
-__all__ = ['PostgresLexer', 'PlPgsqlLexer', 'PostgresConsoleLexer',
-           'PostgresExplainLexer', 'SqlLexer', 'TransactSqlLexer',
-           'MySqlLexer', 'SqliteConsoleLexer', 'RqlLexer']
+__all__ = ['GoogleSqlLexer', 'PostgresLexer', 'PlPgsqlLexer',
+           'PostgresConsoleLexer', 'PostgresExplainLexer', 'SqlLexer',
+           'TransactSqlLexer', 'MySqlLexer', 'SqliteConsoleLexer', 'RqlLexer']
 
 line_re  = re.compile('.*?\n')
 sqlite_prompt_re = re.compile(r'^(?:sqlite|   ...)>(?= )')
@@ -77,6 +79,12 @@ tsql_go_re = re.compile(r'\bgo\b', re.IGNORECASE)
 tsql_declare_re = re.compile(r'\bdeclare\s+@', re.IGNORECASE)
 tsql_variable_re = re.compile(r'@[a-zA-Z_]\w*\b')
 
+# Identifiers for analyse_text()
+googlesql_identifiers = (
+    _googlesql_builtins.functionnames
+    + _googlesql_builtins.keywords
+    + _googlesql_builtins.types)
+
 
 def language_callback(lexer, match):
     """Parse the content of a $-string using a lexer
@@ -964,6 +972,166 @@ class MySqlLexer(RegexLexer):
         return rating
 
 
+class GoogleSqlLexer(RegexLexer):
+    """
+    GoogleSQL is Google's standard SQL dialect, formerly known as ZetaSQL.
+
+    The list of keywords includes reserved words for future use.
+    """
+
+    name = 'GoogleSQL'
+    aliases = ['googlesql', 'zetasql']
+    filenames = ['*.googlesql', '*.googlesql.sql']
+    mimetypes = ['text/x-google-sql', 'text/x-google-sql-aux']
+    url = 'https://cloud.google.com/bigquery/googlesql'
+    version_added = '2.19'
+
+    flags = re.IGNORECASE
+    tokens = {
+        'root': [
+            (r'\s+', Whitespace),
+
+            # Comments
+            (r'(?:#|--\s+).*', Comment.Single),
+            (r'/\*', Comment.Multiline, 'multiline-comment'),
+
+            # Hexadecimal literals
+            (r"x'([0-9a-f]{2})+'", Number.Hex),
+            (r'0x[0-9a-f]+', Number.Hex),
+
+            # Binary literals
+            (r"b'[01]+'", Number.Bin),
+            (r'0b[01]+', Number.Bin),
+
+            # Numeric literals
+            (r'[0-9]+\.[0-9]*(e[+-]?[0-9]+)?', Number.Float),  # Mandatory integer, optional fraction and exponent
+            (r'[0-9]*\.[0-9]+(e[+-]?[0-9]+)?', Number.Float),  # Mandatory fraction, optional integer and exponent
+            (r'[0-9]+e[+-]?[0-9]+', Number.Float),  # Exponents with integer significands are still floats
+            (r'[0-9]+(?=[^0-9a-z$_\u0080-\uffff])', Number.Integer),  # Integers that are not in a schema object name
+
+            # Date literals
+            (r"\{\s*d\s*(?P<quote>['\"])\s*\d{2}(\d{2})?.?\d{2}.?\d{2}\s*(?P=quote)\s*\}",
+             Literal.Date),
+
+            # Time literals
+            (r"\{\s*t\s*(?P<quote>['\"])\s*(?:\d+\s+)?\d{1,2}.?\d{1,2}.?\d{1,2}(\.\d*)?\s*(?P=quote)\s*\}",
+             Literal.Date),
+
+            # Timestamp literals
+            (
+                r"\{\s*ts\s*(?P<quote>['\"])\s*"
+                r"\d{2}(?:\d{2})?.?\d{2}.?\d{2}"  # Date part
+                r"\s+"  # Whitespace between date and time
+                r"\d{1,2}.?\d{1,2}.?\d{1,2}(\.\d*)?"  # Time part
+                r"\s*(?P=quote)\s*\}",
+                Literal.Date
+            ),
+
+            # String literals
+            (r"'", String.Single, 'single-quoted-string'),
+            (r'"', String.Double, 'double-quoted-string'),
+
+            # Variables
+            (r'@@(?:global\.|persist\.|persist_only\.|session\.)?[a-z_]+', Name.Variable),
+            (r'@[a-z0-9_$.]+', Name.Variable),
+            (r"@'", Name.Variable, 'single-quoted-variable'),
+            (r'@"', Name.Variable, 'double-quoted-variable'),
+            (r"@`", Name.Variable, 'backtick-quoted-variable'),
+            (r'\?', Name.Variable),  # For demonstrating prepared statements
+
+            # Exceptions; these words tokenize differently in different contexts.
+            (r'\b(set)(?!\s*\()', Keyword),
+            (r'\b(character)(\s+)(set)\b', bygroups(Keyword, Whitespace, Keyword)),
+
+            # Constants, types, keywords, functions, operators
+            (words(_googlesql_builtins.constants, prefix=r'\b', suffix=r'\b'), Name.Constant),
+            (words(_googlesql_builtins.types, prefix=r'\b', suffix=r'\b'), Keyword.Type),
+            (words(_googlesql_builtins.keywords, prefix=r'\b', suffix=r'\b'), Keyword),
+            (words(_googlesql_builtins.functionnames, prefix=r'\b', suffix=r'\b(\s*)(\()'),
+             bygroups(Name.Function, Whitespace, Punctuation)),
+            (words(_googlesql_builtins.operators, prefix=r'\b', suffix=r'\b'), Operator),
+
+            # Schema object names
+            #
+            # Note: Although the first regex supports unquoted all-numeric
+            # identifiers, this will not be a problem in practice because
+            # numeric literals have already been handled above.
+            #
+            ('[0-9a-z$_\u0080-\uffff]+', Name),
+            (r'`', Name.Quoted, 'schema-object-name'),
+
+            # Punctuation
+            (r'[(),.;]', Punctuation),
+        ],
+
+        # Multiline comment substates
+        # ---------------------------
+
+        'multiline-comment': [
+            (r'[^*]+', Comment.Multiline),
+            (r'\*/', Comment.Multiline, '#pop'),
+            (r'\*', Comment.Multiline),
+        ],
+
+        # String substates
+        # ----------------
+
+        'single-quoted-string': [
+            (r"[^'\\]+", String.Single),
+            (r"''", String.Escape),
+            (r"""\\[0'"bnrtZ\\%_]""", String.Escape),
+            (r"'", String.Single, '#pop'),
+        ],
+
+        'double-quoted-string': [
+            (r'[^"\\]+', String.Double),
+            (r'""', String.Escape),
+            (r"""\\[0'"bnrtZ\\%_]""", String.Escape),
+            (r'"', String.Double, '#pop'),
+        ],
+
+        # Variable substates
+        # ------------------
+
+        'single-quoted-variable': [
+            (r"[^']+", Name.Variable),
+            (r"''", Name.Variable),
+            (r"'", Name.Variable, '#pop'),
+        ],
+
+        'double-quoted-variable': [
+            (r'[^"]+', Name.Variable),
+            (r'""', Name.Variable),
+            (r'"', Name.Variable, '#pop'),
+        ],
+
+        'backtick-quoted-variable': [
+            (r'[^`]+', Name.Variable),
+            (r'``', Name.Variable),
+            (r'`', Name.Variable, '#pop'),
+        ],
+
+        # Schema object name substates
+        # ----------------------------
+        #
+        # "Name.Quoted" and "Name.Quoted.Escape" are non-standard but
+        # formatters will style them as "Name" by default but add
+        # additional styles based on the token name. This gives users
+        # flexibility to add custom styles as desired.
+        #
+        'schema-object-name': [
+            (r'[^`]+', Name.Quoted),
+            (r'``', Name.Quoted.Escape),
+            (r'`', Name.Quoted, '#pop'),
+        ],
+    }
+
+    def analyse_text(text):
+        tokens = collections.Counter(text.split())
+        return 0.001 * sum(count for t, count in tokens.items()
+                           if t in googlesql_identifiers)
+
+
 class SqliteConsoleLexer(Lexer):
     """
     Lexer for example sessions using sqlite3.
diff --git a/scripts/check_sources.py b/scripts/check_sources.py
index cff13d0a..fb305a19 100755
--- a/scripts/check_sources.py
+++ b/scripts/check_sources.py
@@ -146,7 +146,7 @@ def main(argv):
     out = io.StringIO()
 
     for root, dirs, files in os.walk(path):
-        for excl in ['.tox', '.git', 'examplefiles']:
+        for excl in ['.tox', '.git', '.venv', 'examplefiles']:
             if excl in dirs:
                 dirs.remove(excl)
         if '-i' in opts and abspath(root) in opts['-i']:
@@ -179,6 +179,10 @@ def main(argv):
                 print(f"{fn}: cannot open: {err}")
                 num += 1
                 continue
+            except UnicodeDecodeError as err:
+                print(f"{fn}: error decoding: {err}")
+                num += 1
+                continue
 
             for checker in checkerlist:
                 if not in_pygments_pkg and checker.only_pkg:


Test patch:
diff --git a/tests/examplefiles/vue/test.vue b/tests/examplefiles/vue/test.vue
new file mode 100644
index 00000000..ff900418
--- /dev/null
+++ b/tests/examplefiles/vue/test.vue
@@ -0,0 +1,58 @@
+<script>
+export default {
+    data() {
+        return {
+            greeting: 'Hello World!'
+        }
+    }
+}
+</script>
+
+<template>
+    <p class="greeting">{{ greeting }}</p>
+    <div v-bind="objectOfAttrs"></div>
+    {{ number + 1 }}
+    {{ ok ? 'YES' : 'NO' }}
+    {{ message.split('').reverse().join('') }}
+    <div :id="`list-${id}`"></div>
+    <span :title="toTitleDate(date)">
+        {{ formatDate(date) }}
+    </span>
+    <p v-if="seen">Now you see me</p>
+    <a v-bind:href="url"> ... </a>
+    <!-- shorthand -->
+    <a :href="url"> ... </a>
+    <a v-on:click="doSomething"> ... </a>
+    <!-- shorthand -->
+    <a @click="doSomething"> ... </a>
+    <a v-bind:[attributeName]="url"> ... </a>
+    <a :[attributeName]="url"> ... </a>
+    <a v-on:[eventName]="doSomething"> ... </a>
+    <a @[eventName]="doSomething"></a>
+    <form @submit.prevent="onSubmit">...</form>
+    <li v-for="item in items">
+        {{ item.message }}
+    </li>
+    <li v-for="(item, index) in items">
+        {{ parentMessage }} - {{ index }} - {{ item.message }}
+    </li>
+    <li v-for="{ message } in items">
+        {{ message }}
+    </li>
+    <li v-for="({ message }, index) in items">
+        {{ message }} {{ index }}
+    </li>
+    <li v-for="item in items">
+        <span v-for="childItem in item.children">
+            {{ item.message }} {{ childItem }}
+        </span>
+    </li>
+    <div v-for="item of items"></div>
+</template>
+
+<style>
+.greeting {
+    color: red;
+    font-weight: bold;
+}
+</style>
\ No newline at end of file
diff --git a/tests/snippets/bqn/test_inter_word.txt b/tests/snippets/bqn/test_inter_word.txt
new file mode 100644
index 00000000..82b72c34
--- /dev/null
+++ b/tests/snippets/bqn/test_inter_word.txt
@@ -0,0 +1,13 @@
+---input---
+{ab𝕊is: ab}
+
+---tokens---
+'{'           Keyword.Type
+'ab'          Name.Variable
+'𝕊'           Operator
+'is'          Name.Variable
+':'           Name.Entity
+' '           Text.Whitespace
+'ab'          Name.Variable
+'}'           Keyword.Type
+'\n'          Text.Whitespace
diff --git a/tests/snippets/bqn/test_number_underscores.txt b/tests/snippets/bqn/test_number_underscores.txt
new file mode 100644
index 00000000..b87f9b8b
--- /dev/null
+++ b/tests/snippets/bqn/test_number_underscores.txt
@@ -0,0 +1,12 @@
+---input---
+⟨1_.0__1_,10_000,_1⟩
+
+---tokens---
+'⟨'           Punctuation
+'1_.0__1_'    Literal.Number
+','           Punctuation
+'10_000'      Literal.Number
+','           Punctuation
+'_1'          Name.Attribute
+'⟩'           Punctuation
+'\n'          Text.Whitespace
diff --git a/tests/snippets/bqn/test_recursive_modifier.txt b/tests/snippets/bqn/test_recursive_modifier.txt
new file mode 100644
index 00000000..05aa2af4
--- /dev/null
+++ b/tests/snippets/bqn/test_recursive_modifier.txt
@@ -0,0 +1,10 @@
+---input---
+_𝕣 𝕣 _𝕣_
+
+---tokens---
+'_𝕣'          Name.Attribute
+' '           Text.Whitespace
+'𝕣'           Name.Attribute
+' '           Text.Whitespace
+'_𝕣_'         Name.Property
+'\n'          Text.Whitespace
diff --git a/tests/snippets/googlesql/googlesql_test.txt b/tests/snippets/googlesql/googlesql_test.txt
new file mode 100644
index 00000000..b69a64c3
--- /dev/null
+++ b/tests/snippets/googlesql/googlesql_test.txt
@@ -0,0 +1,1485 @@
+---input---
+BEGIN TRANSACTION
+CREATE TEMP TABLE Flights(total INT64)  AS SELECT * FROM UNNEST([10,23,3,14,55]) AS a;
+SELECT *, SPLIT_SUBSTR('blah', 3||4) FROM Flights;
+
+## function calls and builtins
+
+SELECT abs(1.5);
+CREATE OR REPLACE my_table
+SELECT REPLACE('good show', 'good', 'great');
+SELECT LPAD("hello", 10);
+SELECT D3A_COUNT.TO_HLL();
+SELECT KLL_QUANTILES.MERGE_UINT64();
+SELECT MyNonBuiltinFunction(an_arg);
+SELECT MyNonBuiltinFunction((SELECT 1), an_arg), Baz();
+SELECT MyNonBuiltinFunction(')'), Baz(an_arg);
+SELECT (1)
+DEFINE TABLE Foo (options);
+DEFINE MACRO FOO the body of the macro with first arg $1 and second arg $2;
+SELECT $mymacro FROM my_table;
+SELECT "A macro inside a string: $mymacro" FROM my_table;
+SELECT 'A macro inside a string: $mymacro' FROM my_table;
+SELECT """A macro inside a string: $mymacro""" FROM my_table;
+SELECT rb"""A macro inside a string: $mymacro("arg1", "arg2")""" FROM my_table;
+select creation, latency from my_table_${YYYYMMDD+1};
+select creation, latency from my_table_${YYYY+2};
+select creation, latency from my_table_${YYYYMMDD-3};
+select creation, latency from my_table_${DD};
+select "This is the day of the month ${DD}. QED.";
+select * from logs limit ${LimitCount};
+SELECT 1 = 1, 1 != 42;
+SELECT 1 > 2;
+LOAD my.script;
+
+## Ambiguous keywords, either type or function or keywords.
+
+SELECT JSON '{"name": "Alice", "age": 30}';
+SELECT IF("%.1f", 1/3);
+CREATE TABLE IF NOT EXISTS my_table [(my_column int64)];
+SELECT EXTRACT(DAY FROM DATE '2013-12-25');
+SELECT CAST(1 AS BOOL);
+SELECT element from UNNEST([1, 2, 3] as element);
+select [1, 2, 3][OFFSET(0)];
+SELECT * FROM UNNEST(['a', 'b']) AS letter
+ORDER BY letter ASC LIMIT 1 OFFSET 1;
+SELECT * FROM Produce PIVOT(SUM(sales) FOR quarter IN ('Q1', 'Q2', 'Q3', 'Q4'))
+SELECT * FROM Produce UNPIVOT(sales FOR quarter IN (Q1, Q2, Q3, Q4))
+
+## comments
+
+SELECT TRUE;  -- double-dash comment
+SELECT TRUE;  # hash comment
+SELECT TRUE;  // this is a comment
+SELECT /* this is block comment */ TRUE;
+# Bracket comments in stock SQL VS Code config are not supported in GoogleSQL
+SELECT %{bracket comment};
+
+## embedding JS
+
+CREATE FUNCTION f(x INT, y INT)
+RETURNS DOUBLE LANGUAGE js AS """return (x*y);""";
+
+## embedding Lua
+
+CREATE FUNCTION f(x INT, y INT)
+RETURNS DOUBLE LANGUAGE lua AS """return (x*y);""";
+
+### strings
+
+SELECT 'Hi !';
+SELECT "Hi !";
+SELECT 'a tab \t in a single-quoted string';
+SELECT "a tab \t in a single-quoted string";
+SELECT "string with a # sign";
+SELECT 'string with a # sign';
+SELECT 'a string with a \' single quote';
+SELECT "a string with a \" double quote";
+SELECT """triple double quote""";
+SELECT '''triple single quote''';
+SELECT 'triple single quote no word boundary';
+SELECT "triple single quote no word boundary";
+SELECT '''triple single quote no word boundary''';
+SELECT b'binary single quoted string';
+SELECT B'binary single quoted string';
+SELECT b"binary double quoted string";
+SELECT B"binary double quoted string";
+SELECT b'''triple single quote''';
+SELECT B'''triple single quote''';
+SELECT b"""triple double quote""";
+SELECT B"""triple double quote""";
+SELECT r"raw single quoted string";
+SELECT r"double quote";
+SELECT rb"double quote";
+SELECT rB"double quote";
+SELECT R"double quote";
+SELECT Rb"double quote";
+SELECT RB"double quote";
+SELECT r'single quote';
+SELECT rb'single quote';
+SELECT rB'single quote';
+SELECT R'single quote';
+SELECT Rb'single quote';
+SELECT RB'single quote';
+SELECT r'single quote with an uninterpreted \' escape';
+SELECT b'single quote with an *interpreted* \' escape';
+SELECT r"""raw single quoted string""";
+SELECT r'''triple single quote''';
+SELECT rb'''triple single quote''';
+SELECT rB'''triple single quote''';
+SELECT R'''triple single quote''';
+SELECT Rb'''triple single quote''';
+SELECT RB'''triple single quote''';
+SELECT r"""triple double quote""";
+SELECT rb"""triple double quote""";
+SELECT rB"""triple double quote""";
+SELECT R"""triple double quote""";
+SELECT Rb"""triple double quote""";
+SELECT RB"""triple double quote""";
+SELECT RBr"""triple double quote""";
+SELECT RBb"""triple double quote""";
+SELECT rr"invalid raw single quoted string";
+SELECT rr"""invalid raw single quoted string""";
+SELECT rr'invalid raw single quoted string';
+
+---tokens---
+'BEGIN'       Keyword
+' '           Text.Whitespace
+'TRANSACTION' Keyword
+'\n'          Text.Whitespace
+
+'CREATE'      Keyword
+' '           Text.Whitespace
+'TEMP'        Keyword
+' '           Text.Whitespace
+'TABLE'       Keyword
+' '           Text.Whitespace
+'Flights'     Name
+'('           Punctuation
+'total'       Name
+' '           Text.Whitespace
+'INT64'       Keyword.Type
+')'           Punctuation
+'  '          Text.Whitespace
+'AS'          Keyword
+' '           Text.Whitespace
+'SELECT'      Keyword
+' '           Text.Whitespace
+'*'           Error
+' '           Text.Whitespace
+'FROM'        Keyword
+' '           Text.Whitespace
+'UNNEST'      Keyword
+'('           Punctuation
+'['           Error
+'10'          Literal.Number.Integer
+','           Punctuation
+'23'          Literal.Number.Integer
+','           Punctuation
+'3'           Literal.Number.Integer
+','           Punctuation
+'14'          Literal.Number.Integer
+','           Punctuation
+'55'          Literal.Number.Integer
+']'           Error
+')'           Punctuation
+' '           Text.Whitespace
+'AS'          Keyword
+' '           Text.Whitespace
+'a'           Name
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+'*'           Error
+','           Punctuation
+' '           Text.Whitespace
+'SPLIT_SUBSTR' Name.Function
+'('           Punctuation
+"'"           Literal.String.Single
+'blah'        Literal.String.Single
+"'"           Literal.String.Single
+','           Punctuation
+' '           Text.Whitespace
+'3'           Literal.Number.Integer
+'||'          Operator
+'4'           Literal.Number.Integer
+')'           Punctuation
+' '           Text.Whitespace
+'FROM'        Keyword
+' '           Text.Whitespace
+'Flights'     Name
+';'           Punctuation
+'\n\n'        Text.Whitespace
+
+'## function calls and builtins' Comment.Single
+'\n\n'        Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+'abs'         Name.Function
+'('           Punctuation
+'1.5'         Literal.Number.Float
+')'           Punctuation
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'CREATE'      Keyword
+' '           Text.Whitespace
+'OR'          Keyword
+' '           Text.Whitespace
+'REPLACE'     Keyword
+' '           Text.Whitespace
+'my_table'    Name
+'\n'          Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+'REPLACE'     Keyword
+'('           Punctuation
+"'"           Literal.String.Single
+'good show'   Literal.String.Single
+"'"           Literal.String.Single
+','           Punctuation
+' '           Text.Whitespace
+"'"           Literal.String.Single
+'good'        Literal.String.Single
+"'"           Literal.String.Single
+','           Punctuation
+' '           Text.Whitespace
+"'"           Literal.String.Single
+'great'       Literal.String.Single
+"'"           Literal.String.Single
+')'           Punctuation
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+'LPAD'        Name.Function
+'('           Punctuation
+'"'           Literal.String.Double
+'hello'       Literal.String.Double
+'"'           Literal.String.Double
+','           Punctuation
+' '           Text.Whitespace
+'10'          Literal.Number.Integer
+')'           Punctuation
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+'D3A_COUNT.TO_HLL' Name.Function
+'('           Punctuation
+')'           Punctuation
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+'KLL_QUANTILES' Name
+'.'           Punctuation
+'MERGE_UINT64' Name
+'('           Punctuation
+')'           Punctuation
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+'MyNonBuiltinFunction' Name
+'('           Punctuation
+'an_arg'      Name
+')'           Punctuation
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+'MyNonBuiltinFunction' Name
+'('           Punctuation
+'('           Punctuation
+'SELECT'      Keyword
+' '           Text.Whitespace
+'1'           Literal.Number.Integer
+')'           Punctuation
+','           Punctuation
+' '           Text.Whitespace
+'an_arg'      Name
+')'           Punctuation
+','           Punctuation
+' '           Text.Whitespace
+'Baz'         Name
+'('           Punctuation
+')'           Punctuation
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+'MyNonBuiltinFunction' Name
+'('           Punctuation
+"'"           Literal.String.Single
+')'           Literal.String.Single
+"'"           Literal.String.Single
+')'           Punctuation
+','           Punctuation
+' '           Text.Whitespace
+'Baz'         Name
+'('           Punctuation
+'an_arg'      Name
+')'           Punctuation
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+'('           Punctuation
+'1'           Literal.Number.Integer
+')'           Punctuation
+'\n'          Text.Whitespace
+
+'DEFINE'      Keyword
+' '           Text.Whitespace
+'TABLE'       Keyword
+' '           Text.Whitespace
+'Foo'         Name
+' '           Text.Whitespace
+'('           Punctuation
+'options'     Keyword
+')'           Punctuation
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'DEFINE'      Keyword
+' '           Text.Whitespace
+'MACRO'       Keyword
+' '           Text.Whitespace
+'FOO'         Name
+' '           Text.Whitespace
+'the'         Name
+' '           Text.Whitespace
+'body'        Name
+' '           Text.Whitespace
+'of'          Keyword
+' '           Text.Whitespace
+'the'         Name
+' '           Text.Whitespace
+'macro'       Keyword
+' '           Text.Whitespace
+'with'        Keyword
+' '           Text.Whitespace
+'first'       Keyword
+' '           Text.Whitespace
+'arg'         Name
+' '           Text.Whitespace
+'$1'          Name
+' '           Text.Whitespace
+'and'         Keyword
+' '           Text.Whitespace
+'second '     Keyword
+'arg'         Name
+' '           Text.Whitespace
+'$2'          Name
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+'$mymacro'    Name
+' '           Text.Whitespace
+'FROM'        Keyword
+' '           Text.Whitespace
+'my_table'    Name
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+'"'           Literal.String.Double
+'A macro inside a string: $mymacro' Literal.String.Double
+'"'           Literal.String.Double
+' '           Text.Whitespace
+'FROM'        Keyword
+' '           Text.Whitespace
+'my_table'    Name
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+"'"           Literal.String.Single
+'A macro inside a string: $mymacro' Literal.String.Single
+"'"           Literal.String.Single
+' '           Text.Whitespace
+'FROM'        Keyword
+' '           Text.Whitespace
+'my_table'    Name
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+'"'           Literal.String.Double
+'""'          Literal.String.Escape
+'A macro inside a string: $mymacro' Literal.String.Double
+'""'          Literal.String.Escape
+'"'           Literal.String.Double
+' '           Text.Whitespace
+'FROM'        Keyword
+' '           Text.Whitespace
+'my_table'    Name
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+'rb'          Name
+'"'           Literal.String.Double
+'""'          Literal.String.Escape
+'A macro inside a string: $mymacro(' Literal.String.Double
+'"'           Literal.String.Double
+'arg1'        Name
+'"'           Literal.String.Double
+', '          Literal.String.Double
+'"'           Literal.String.Double
+'arg2'        Name
+'"'           Literal.String.Double
+')'           Literal.String.Double
+'""'          Literal.String.Escape
+'"'           Literal.String.Double
+' '           Text.Whitespace
+'FROM'        Keyword
+' '           Text.Whitespace
+'my_table'    Name
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'select'      Keyword
+' '           Text.Whitespace
+'creation'    Name
+','           Punctuation
+' '           Text.Whitespace
+'latency'     Name
+' '           Text.Whitespace
+'from'        Keyword
+' '           Text.Whitespace
+'my_table_$'  Name
+'{'           Error
+'YYYYMMDD'    Name
+'+'           Operator
+'1'           Literal.Number.Integer
+'}'           Error
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'select'      Keyword
+' '           Text.Whitespace
+'creation'    Name
+','           Punctuation
+' '           Text.Whitespace
+'latency'     Name
+' '           Text.Whitespace
+'from'        Keyword
+' '           Text.Whitespace
+'my_table_$'  Name
+'{'           Error
+'YYYY'        Name
+'+'           Operator
+'2'           Literal.Number.Integer
+'}'           Error
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'select'      Keyword
+' '           Text.Whitespace
+'creation'    Name
+','           Punctuation
+' '           Text.Whitespace
+'latency'     Name
+' '           Text.Whitespace
+'from'        Keyword
+' '           Text.Whitespace
+'my_table_$'  Name
+'{'           Error
+'YYYYMMDD'    Name
+'-'           Operator
+'3'           Literal.Number.Integer
+'}'           Error
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'select'      Keyword
+' '           Text.Whitespace
+'creation'    Name
+','           Punctuation
+' '           Text.Whitespace
+'latency'     Name
+' '           Text.Whitespace
+'from'        Keyword
+' '           Text.Whitespace
+'my_table_$'  Name
+'{'           Error
+'DD'          Name
+'}'           Error
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'select'      Keyword
+' '           Text.Whitespace
+'"'           Literal.String.Double
+'This is the day of the month ${DD}. QED.' Literal.String.Double
+'"'           Literal.String.Double
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'select'      Keyword
+' '           Text.Whitespace
+'*'           Error
+' '           Text.Whitespace
+'from'        Keyword
+' '           Text.Whitespace
+'logs'        Name
+' '           Text.Whitespace
+'limit'       Keyword
+' '           Text.Whitespace
+'$'           Name
+'{'           Error
+'LimitCount'  Name
+'}'           Error
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+'1'           Literal.Number.Integer
+' '           Text.Whitespace
+'='           Error
+' '           Text.Whitespace
+'1'           Literal.Number.Integer
+','           Punctuation
+' '           Text.Whitespace
+'1'           Literal.Number.Integer
+' '           Text.Whitespace
+'!'           Error
+'='           Error
+' '           Text.Whitespace
+'42'          Literal.Number.Integer
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+'1'           Literal.Number.Integer
+' '           Text.Whitespace
+'>'           Error
+' '           Text.Whitespace
+'2'           Literal.Number.Integer
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'LOAD'        Keyword
+' '           Text.Whitespace
+'my'          Name
+'.'           Punctuation
+'script'      Name
+';'           Punctuation
+'\n\n'        Text.Whitespace
+
+'## Ambiguous keywords, either type or function or keywords.' Comment.Single
+'\n\n'        Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+'JSON'        Keyword.Type
+' '           Text.Whitespace
+"'"           Literal.String.Single
+'{"name": "Alice", "age": 30}' Literal.String.Single
+"'"           Literal.String.Single
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+'IF'          Keyword
+'('           Punctuation
+'"'           Literal.String.Double
+'%.1f'        Literal.String.Double
+'"'           Literal.String.Double
+','           Punctuation
+' '           Text.Whitespace
+'1'           Literal.Number.Integer
+'/'           Operator
+'3'           Literal.Number.Integer
+')'           Punctuation
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'CREATE'      Keyword
+' '           Text.Whitespace
+'TABLE'       Keyword
+' '           Text.Whitespace
+'IF'          Keyword
+' '           Text.Whitespace
+'NOT'         Keyword
+' '           Text.Whitespace
+'EXISTS'      Keyword
+' '           Text.Whitespace
+'my_table'    Name
+' '           Text.Whitespace
+'['           Error
+'('           Punctuation
+'my_column'   Name
+' '           Text.Whitespace
+'int64'       Keyword.Type
+')'           Punctuation
+']'           Error
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+'EXTRACT'     Keyword
+'('           Punctuation
+'DAY'         Keyword
+' '           Text.Whitespace
+'FROM'        Keyword
+' '           Text.Whitespace
+'DATE'        Keyword.Type
+' '           Text.Whitespace
+"'"           Literal.String.Single
+'2013-12-25'  Literal.String.Single
+"'"           Literal.String.Single
+')'           Punctuation
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+'CAST'        Keyword
+'('           Punctuation
+'1'           Literal.Number.Integer
+' '           Text.Whitespace
+'AS'          Keyword
+' '           Text.Whitespace
+'BOOL'        Keyword.Type
+')'           Punctuation
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+'element'     Name
+' '           Text.Whitespace
+'from'        Keyword
+' '           Text.Whitespace
+'UNNEST'      Keyword
+'('           Punctuation
+'['           Error
+'1'           Literal.Number.Integer
+','           Punctuation
+' '           Text.Whitespace
+'2'           Literal.Number.Integer
+','           Punctuation
+' '           Text.Whitespace
+'3'           Literal.Number.Integer
+']'           Error
+' '           Text.Whitespace
+'as'          Keyword
+' '           Text.Whitespace
+'element'     Name
+')'           Punctuation
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'select'      Keyword
+' '           Text.Whitespace
+'['           Error
+'1'           Literal.Number.Integer
+','           Punctuation
+' '           Text.Whitespace
+'2'           Literal.Number.Integer
+','           Punctuation
+' '           Text.Whitespace
+'3'           Literal.Number.Integer
+']'           Error
+'['           Error
+'OFFSET'      Keyword
+'('           Punctuation
+'0'           Literal.Number.Integer
+')'           Punctuation
+']'           Error
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+'*'           Error
+' '           Text.Whitespace
+'FROM'        Keyword
+' '           Text.Whitespace
+'UNNEST'      Keyword
+'('           Punctuation
+'['           Error
+"'"           Literal.String.Single
+'a'           Literal.String.Single
+"'"           Literal.String.Single
+','           Punctuation
+' '           Text.Whitespace
+"'"           Literal.String.Single
+'b'           Literal.String.Single
+"'"           Literal.String.Single
+']'           Error
+')'           Punctuation
+' '           Text.Whitespace
+'AS'          Keyword
+' '           Text.Whitespace
+'letter'      Name
+'\n'          Text.Whitespace
+
+'ORDER'       Keyword
+' '           Text.Whitespace
+'BY'          Keyword
+' '           Text.Whitespace
+'letter'      Name
+' '           Text.Whitespace
+'ASC'         Keyword
+' '           Text.Whitespace
+'LIMIT'       Keyword
+' '           Text.Whitespace
+'1'           Literal.Number.Integer
+' '           Text.Whitespace
+'OFFSET'      Keyword
+' '           Text.Whitespace
+'1'           Literal.Number.Integer
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+'*'           Error
+' '           Text.Whitespace
+'FROM'        Keyword
+' '           Text.Whitespace
+'Produce'     Name
+' '           Text.Whitespace
+'PIVOT'       Keyword
+'('           Punctuation
+'SUM'         Name.Function
+'('           Punctuation
+'sales'       Name
+')'           Punctuation
+' '           Text.Whitespace
+'FOR'         Keyword
+' '           Text.Whitespace
+'quarter'     Keyword
+' '           Text.Whitespace
+'IN'          Keyword
+' '           Text.Whitespace
+'('           Punctuation
+"'"           Literal.String.Single
+'Q1'          Literal.String.Single
+"'"           Literal.String.Single
+','           Punctuation
+' '           Text.Whitespace
+"'"           Literal.String.Single
+'Q2'          Literal.String.Single
+"'"           Literal.String.Single
+','           Punctuation
+' '           Text.Whitespace
+"'"           Literal.String.Single
+'Q3'          Literal.String.Single
+"'"           Literal.String.Single
+','           Punctuation
+' '           Text.Whitespace
+"'"           Literal.String.Single
+'Q4'          Literal.String.Single
+"'"           Literal.String.Single
+')'           Punctuation
+')'           Punctuation
+'\n'          Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+'*'           Error
+' '           Text.Whitespace
+'FROM'        Keyword
+' '           Text.Whitespace
+'Produce'     Name
+' '           Text.Whitespace
+'UNPIVOT'     Keyword
+'('           Punctuation
+'sales'       Name
+' '           Text.Whitespace
+'FOR'         Keyword
+' '           Text.Whitespace
+'quarter'     Keyword
+' '           Text.Whitespace
+'IN'          Keyword
+' '           Text.Whitespace
+'('           Punctuation
+'Q1'          Name
+','           Punctuation
+' '           Text.Whitespace
+'Q2'          Name
+','           Punctuation
+' '           Text.Whitespace
+'Q3'          Name
+','           Punctuation
+' '           Text.Whitespace
+'Q4'          Name
+')'           Punctuation
+')'           Punctuation
+'\n\n'        Text.Whitespace
+
+'## comments' Comment.Single
+'\n\n'        Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+'TRUE'        Name.Constant
+';'           Punctuation
+'  '          Text.Whitespace
+'-- double-dash comment' Comment.Single
+'\n'          Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+'TRUE'        Name.Constant
+';'           Punctuation
+'  '          Text.Whitespace
+'# hash comment' Comment.Single
+'\n'          Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+'TRUE'        Name.Constant
+';'           Punctuation
+'  '          Text.Whitespace
+'/'           Error
+'/'           Error
+' '           Text.Whitespace
+'this'        Name
+' '           Text.Whitespace
+'is'          Keyword
+' '           Text.Whitespace
+'a'           Name
+' '           Text.Whitespace
+'comment'     Name
+'\n'          Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+'/*'          Comment.Multiline
+' this is block comment ' Comment.Multiline
+'*/'          Comment.Multiline
+' '           Text.Whitespace
+'TRUE'        Name.Constant
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'# Bracket comments in stock SQL VS Code config are not supported in GoogleSQL' Comment.Single
+'\n'          Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+'%'           Error
+'{'           Error
+'bracket'     Name
+' '           Text.Whitespace
+'comment'     Name
+'}'           Error
+';'           Punctuation
+'\n\n'        Text.Whitespace
+
+'## embedding JS' Comment.Single
+'\n\n'        Text.Whitespace
+
+'CREATE'      Keyword
+' '           Text.Whitespace
+'FUNCTION'    Keyword
+' '           Text.Whitespace
+'f'           Name
+'('           Punctuation
+'x'           Name
+' '           Text.Whitespace
+'INT'         Name
+','           Punctuation
+' '           Text.Whitespace
+'y'           Name
+' '           Text.Whitespace
+'INT'         Name
+')'           Punctuation
+'\n'          Text.Whitespace
+
+'RETURNS'     Keyword
+' '           Text.Whitespace
+'DOUBLE'      Keyword.Type
+' '           Text.Whitespace
+'LANGUAGE'    Keyword
+' '           Text.Whitespace
+'js'          Name
+' '           Text.Whitespace
+'AS'          Keyword
+' '           Text.Whitespace
+'"'           Literal.String.Double
+'""'          Literal.String.Escape
+'return (x*y);' Literal.String.Double
+'""'          Literal.String.Escape
+'"'           Literal.String.Double
+';'           Punctuation
+'\n\n'        Text.Whitespace
+
+'## embedding Lua' Comment.Single
+'\n\n'        Text.Whitespace
+
+'CREATE'      Keyword
+' '           Text.Whitespace
+'FUNCTION'    Keyword
+' '           Text.Whitespace
+'f'           Name
+'('           Punctuation
+'x'           Name
+' '           Text.Whitespace
+'INT'         Name
+','           Punctuation
+' '           Text.Whitespace
+'y'           Name
+' '           Text.Whitespace
+'INT'         Name
+')'           Punctuation
+'\n'          Text.Whitespace
+
+'RETURNS'     Keyword
+' '           Text.Whitespace
+'DOUBLE'      Keyword.Type
+' '           Text.Whitespace
+'LANGUAGE'    Keyword
+' '           Text.Whitespace
+'lua'         Name
+' '           Text.Whitespace
+'AS'          Keyword
+' '           Text.Whitespace
+'"'           Literal.String.Double
+'""'          Literal.String.Escape
+'return (x*y);' Literal.String.Double
+'""'          Literal.String.Escape
+'"'           Literal.String.Double
+';'           Punctuation
+'\n\n'        Text.Whitespace
+
+'### strings' Comment.Single
+'\n\n'        Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+"'"           Literal.String.Single
+'Hi !'        Literal.String.Single
+"'"           Literal.String.Single
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+'"'           Literal.String.Double
+'Hi !'        Literal.String.Double
+'"'           Literal.String.Double
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+"'"           Literal.String.Single
+'a tab '      Literal.String.Single
+'\\t'         Literal.String.Escape
+' in a single-quoted string' Literal.String.Single
+"'"           Literal.String.Single
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+'"'           Literal.String.Double
+'a tab '      Literal.String.Double
+'\\t'         Literal.String.Escape
+' in a single-quoted string' Literal.String.Double
+'"'           Literal.String.Double
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+'"'           Literal.String.Double
+'string with a # sign' Literal.String.Double
+'"'           Literal.String.Double
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+"'"           Literal.String.Single
+'string with a # sign' Literal.String.Single
+"'"           Literal.String.Single
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+"'"           Literal.String.Single
+'a string with a ' Literal.String.Single
+"\\'"         Literal.String.Escape
+' single quote' Literal.String.Single
+"'"           Literal.String.Single
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+'"'           Literal.String.Double
+'a string with a ' Literal.String.Double
+'\\"'         Literal.String.Escape
+' double quote' Literal.String.Double
+'"'           Literal.String.Double
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+'"'           Literal.String.Double
+'""'          Literal.String.Escape
+'triple double quote' Literal.String.Double
+'""'          Literal.String.Escape
+'"'           Literal.String.Double
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+"'"           Literal.String.Single
+"''"          Literal.String.Escape
+'triple single quote' Literal.String.Single
+"''"          Literal.String.Escape
+"'"           Literal.String.Single
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+"'"           Literal.String.Single
+'triple single quote no word boundary' Literal.String.Single
+"'"           Literal.String.Single
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+'"'           Literal.String.Double
+'triple single quote no word boundary' Literal.String.Double
+'"'           Literal.String.Double
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+"'"           Literal.String.Single
+"''"          Literal.String.Escape
+'triple single quote no word boundary' Literal.String.Single
+"''"          Literal.String.Escape
+"'"           Literal.String.Single
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+'b'           Name
+"'"           Literal.String.Single
+'binary single quoted string' Literal.String.Single
+"'"           Literal.String.Single
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+'B'           Name
+"'"           Literal.String.Single
+'binary single quoted string' Literal.String.Single
+"'"           Literal.String.Single
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+'b'           Name
+'"'           Literal.String.Double
+'binary double quoted string' Literal.String.Double
+'"'           Literal.String.Double
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+'B'           Name
+'"'           Literal.String.Double
+'binary double quoted string' Literal.String.Double
+'"'           Literal.String.Double
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+'b'           Name
+"'"           Literal.String.Single
+"''"          Literal.String.Escape
+'triple single quote' Literal.String.Single
+"''"          Literal.String.Escape
+"'"           Literal.String.Single
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+'B'           Name
+"'"           Literal.String.Single
+"''"          Literal.String.Escape
+'triple single quote' Literal.String.Single
+"''"          Literal.String.Escape
+"'"           Literal.String.Single
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+'b'           Name
+'"'           Literal.String.Double
+'""'          Literal.String.Escape
+'triple double quote' Literal.String.Double
+'""'          Literal.String.Escape
+'"'           Literal.String.Double
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+'B'           Name
+'"'           Literal.String.Double
+'""'          Literal.String.Escape
+'triple double quote' Literal.String.Double
+'""'          Literal.String.Escape
+'"'           Literal.String.Double
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+'r'           Name
+'"'           Literal.String.Double
+'raw single quoted string' Literal.String.Double
+'"'           Literal.String.Double
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+'r'           Name
+'"'           Literal.String.Double
+'double quote' Literal.String.Double
+'"'           Literal.String.Double
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+'rb'          Name
+'"'           Literal.String.Double
+'double quote' Literal.String.Double
+'"'           Literal.String.Double
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+'rB'          Name
+'"'           Literal.String.Double
+'double quote' Literal.String.Double
+'"'           Literal.String.Double
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+'R'           Name
+'"'           Literal.String.Double
+'double quote' Literal.String.Double
+'"'           Literal.String.Double
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+'Rb'          Name
+'"'           Literal.String.Double
+'double quote' Literal.String.Double
+'"'           Literal.String.Double
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+'RB'          Name
+'"'           Literal.String.Double
+'double quote' Literal.String.Double
+'"'           Literal.String.Double
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+'r'           Name
+"'"           Literal.String.Single
+'single quote' Literal.String.Single
+"'"           Literal.String.Single
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+'rb'          Name
+"'"           Literal.String.Single
+'single quote' Literal.String.Single
+"'"           Literal.String.Single
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+'rB'          Name
+"'"           Literal.String.Single
+'single quote' Literal.String.Single
+"'"           Literal.String.Single
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+'R'           Name
+"'"           Literal.String.Single
+'single quote' Literal.String.Single
+"'"           Literal.String.Single
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+'Rb'          Name
+"'"           Literal.String.Single
+'single quote' Literal.String.Single
+"'"           Literal.String.Single
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+'RB'          Name
+"'"           Literal.String.Single
+'single quote' Literal.String.Single
+"'"           Literal.String.Single
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+'r'           Name
+"'"           Literal.String.Single
+'single quote with an uninterpreted ' Literal.String.Single
+"\\'"         Literal.String.Escape
+' escape'     Literal.String.Single
+"'"           Literal.String.Single
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+'b'           Name
+"'"           Literal.String.Single
+'single quote with an *interpreted* ' Literal.String.Single
+"\\'"         Literal.String.Escape
+' escape'     Literal.String.Single
+"'"           Literal.String.Single
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+'r'           Name
+'"'           Literal.String.Double
+'""'          Literal.String.Escape
+'raw single quoted string' Literal.String.Double
+'""'          Literal.String.Escape
+'"'           Literal.String.Double
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+'r'           Name
+"'"           Literal.String.Single
+"''"          Literal.String.Escape
+'triple single quote' Literal.String.Single
+"''"          Literal.String.Escape
+"'"           Literal.String.Single
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+'rb'          Name
+"'"           Literal.String.Single
+"''"          Literal.String.Escape
+'triple single quote' Literal.String.Single
+"''"          Literal.String.Escape
+"'"           Literal.String.Single
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+'rB'          Name
+"'"           Literal.String.Single
+"''"          Literal.String.Escape
+'triple single quote' Literal.String.Single
+"''"          Literal.String.Escape
+"'"           Literal.String.Single
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+'R'           Name
+"'"           Literal.String.Single
+"''"          Literal.String.Escape
+'triple single quote' Literal.String.Single
+"''"          Literal.String.Escape
+"'"           Literal.String.Single
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+'Rb'          Name
+"'"           Literal.String.Single
+"''"          Literal.String.Escape
+'triple single quote' Literal.String.Single
+"''"          Literal.String.Escape
+"'"           Literal.String.Single
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+'RB'          Name
+"'"           Literal.String.Single
+"''"          Literal.String.Escape
+'triple single quote' Literal.String.Single
+"''"          Literal.String.Escape
+"'"           Literal.String.Single
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+'r'           Name
+'"'           Literal.String.Double
+'""'          Literal.String.Escape
+'triple double quote' Literal.String.Double
+'""'          Literal.String.Escape
+'"'           Literal.String.Double
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+'rb'          Name
+'"'           Literal.String.Double
+'""'          Literal.String.Escape
+'triple double quote' Literal.String.Double
+'""'          Literal.String.Escape
+'"'           Literal.String.Double
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+'rB'          Name
+'"'           Literal.String.Double
+'""'          Literal.String.Escape
+'triple double quote' Literal.String.Double
+'""'          Literal.String.Escape
+'"'           Literal.String.Double
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+'R'           Name
+'"'           Literal.String.Double
+'""'          Literal.String.Escape
+'triple double quote' Literal.String.Double
+'""'          Literal.String.Escape
+'"'           Literal.String.Double
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+'Rb'          Name
+'"'           Literal.String.Double
+'""'          Literal.String.Escape
+'triple double quote' Literal.String.Double
+'""'          Literal.String.Escape
+'"'           Literal.String.Double
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+'RB'          Name
+'"'           Literal.String.Double
+'""'          Literal.String.Escape
+'triple double quote' Literal.String.Double
+'""'          Literal.String.Escape
+'"'           Literal.String.Double
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+'RBr'         Name
+'"'           Literal.String.Double
+'""'          Literal.String.Escape
+'triple double quote' Literal.String.Double
+'""'          Literal.String.Escape
+'"'           Literal.String.Double
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+'RBb'         Name
+'"'           Literal.String.Double
+'""'          Literal.String.Escape
+'triple double quote' Literal.String.Double
+'""'          Literal.String.Escape
+'"'           Literal.String.Double
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+'rr'          Name
+'"'           Literal.String.Double
+'invalid raw single quoted string' Literal.String.Double
+'"'           Literal.String.Double
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+'rr'          Name
+'"'           Literal.String.Double
+'""'          Literal.String.Escape
+'invalid raw single quoted string' Literal.String.Double
+'""'          Literal.String.Escape
+'"'           Literal.String.Double
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'SELECT'      Keyword
+' '           Text.Whitespace
+'rr'          Name
+"'"           Literal.String.Single
+'invalid raw single quoted string' Literal.String.Single
+"'"           Literal.String.Single
+';'           Punctuation
+'\n'          Text.Whitespace
diff --git a/tests/snippets/hare/hello-world.txt b/tests/snippets/hare/hello-world.txt
new file mode 100644
index 00000000..20eba9ce
--- /dev/null
+++ b/tests/snippets/hare/hello-world.txt
@@ -0,0 +1,119 @@
+---input---
+use fmt;
+
+export fn main() void = {
+	const greetings = [
+		"Hello, world!",
+		"¡Hola Mundo!",
+		"Γειά σου Κόσμε!",
+		"Привіт, світе!",
+		"こんにちは世界！",
+	];
+	for (let greeting .. greetings) {
+		fmt::println(greeting)!;
+	};
+};
+
+---tokens---
+'use fmt;'    Comment.Preproc
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'export'      Keyword
+' '           Text.Whitespace
+'fn'          Keyword
+' '           Text.Whitespace
+'main'        Name
+'()'          Punctuation
+' '           Text.Whitespace
+'void'        Keyword.Type
+' '           Text.Whitespace
+'='           Operator
+' '           Text.Whitespace
+'{'           Punctuation
+'\n'          Text.Whitespace
+
+'\t'          Text.Whitespace
+'const'       Keyword
+' '           Text.Whitespace
+'greetings'   Name
+' '           Text.Whitespace
+'='           Operator
+' '           Text.Whitespace
+'['           Punctuation
+'\n'          Text.Whitespace
+
+'\t\t'        Text.Whitespace
+'"'           Literal.String
+'Hello, world!' Literal.String
+'"'           Literal.String
+','           Punctuation
+'\n'          Text.Whitespace
+
+'\t\t'        Text.Whitespace
+'"'           Literal.String
+'¡Hola Mundo!' Literal.String
+'"'           Literal.String
+','           Punctuation
+'\n'          Text.Whitespace
+
+'\t\t'        Text.Whitespace
+'"'           Literal.String
+'Γειά σου Κόσμε!' Literal.String
+'"'           Literal.String
+','           Punctuation
+'\n'          Text.Whitespace
+
+'\t\t'        Text.Whitespace
+'"'           Literal.String
+'Привіт, світе!' Literal.String
+'"'           Literal.String
+','           Punctuation
+'\n'          Text.Whitespace
+
+'\t\t'        Text.Whitespace
+'"'           Literal.String
+'こんにちは世界！'    Literal.String
+'"'           Literal.String
+','           Punctuation
+'\n'          Text.Whitespace
+
+'\t'          Text.Whitespace
+'];'          Punctuation
+'\n'          Text.Whitespace
+
+'\t'          Text.Whitespace
+'for'         Keyword
+' '           Text.Whitespace
+'('           Punctuation
+'let'         Keyword
+' '           Text.Whitespace
+'greeting'    Name
+' '           Text.Whitespace
+'..'          Operator
+' '           Text.Whitespace
+'greetings'   Name
+')'           Punctuation
+' '           Text.Whitespace
+'{'           Punctuation
+'\n'          Text.Whitespace
+
+'\t\t'        Text.Whitespace
+'fmt'         Name
+':'           Operator
+':'           Operator
+'println'     Name
+'('           Punctuation
+'greeting'    Name
+')'           Punctuation
+'!'           Operator
+';'           Punctuation
+'\n'          Text.Whitespace
+
+'\t'          Text.Whitespace
+'};'          Punctuation
+'\n'          Text.Whitespace
+
+'};'          Punctuation
+'\n'          Text.Whitespace
diff --git a/tests/snippets/rego/test_assignment_and_equality.txt b/tests/snippets/rego/test_assignment_and_equality.txt
new file mode 100644
index 00000000..d8c1f3ad
--- /dev/null
+++ b/tests/snippets/rego/test_assignment_and_equality.txt
@@ -0,0 +1,94 @@
+---input---
+package example
+
+# Rego Policy References: https://www.openpolicyagent.org/docs/latest/policy-reference/
+
+# assign variable x to value of field foo.bar.baz in input
+x := input.foo.bar.baz
+
+# check if variable x has same value as variable y
+x == y
+
+# check if variable x is a set containing "foo" and "bar"
+x == {"foo", "bar"}
+
+# OR
+
+{"foo", "bar"} == x
+
+---tokens---
+'package'     Keyword
+' '           Text.Whitespace
+'example'     Name
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'# Rego Policy References: https://www.openpolicyagent.org/docs/latest/policy-reference/' Comment.Single
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'# assign variable x to value of field foo.bar.baz in input' Comment.Single
+'\n'          Text.Whitespace
+
+'x'           Name
+' '           Text.Whitespace
+':='          Operator
+' '           Text.Whitespace
+'input'       Name.Builtin
+'.'           Punctuation
+'foo'         Name
+'.'           Punctuation
+'bar'         Name
+'.'           Punctuation
+'baz'         Name
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'# check if variable x has same value as variable y' Comment.Single
+'\n'          Text.Whitespace
+
+'x'           Name
+' '           Text.Whitespace
+'=='          Operator
+' '           Text.Whitespace
+'y'           Name
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'# check if variable x is a set containing "foo" and "bar"' Comment.Single
+'\n'          Text.Whitespace
+
+'x'           Name
+' '           Text.Whitespace
+'=='          Operator
+' '           Text.Whitespace
+'{'           Punctuation
+'"foo"'       Literal.String.Double
+','           Punctuation
+' '           Text.Whitespace
+'"bar"'       Literal.String.Double
+'}'           Punctuation
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'# OR'        Comment.Single
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'{'           Punctuation
+'"foo"'       Literal.String.Double
+','           Punctuation
+' '           Text.Whitespace
+'"bar"'       Literal.String.Double
+'}'           Punctuation
+' '           Text.Whitespace
+'=='          Operator
+' '           Text.Whitespace
+'x'           Name
+'\n'          Text.Whitespace
diff --git a/tests/snippets/rego/test_builtin_functions.txt b/tests/snippets/rego/test_builtin_functions.txt
new file mode 100644
index 00000000..5089abd4
--- /dev/null
+++ b/tests/snippets/rego/test_builtin_functions.txt
@@ -0,0 +1,1880 @@
+---input---
+package test_builtins
+
+# Comparison
+test_comparison {
+    1 == 1
+    1 != 2
+    2 > 1
+    2 >= 2
+    1 < 2
+    1 <= 1
+}
+
+# Numbers
+test_numbers {
+    abs(-5) == 5
+    ceil(3.7) == 4
+    floor(3.7) == 3
+    round(3.5) == 4
+    numbers.range(1, 3) == [1, 2, 3]
+    7 / 2 == 3.5
+    7 % 3 == 1
+}
+
+# Aggregates
+test_aggregates {
+    count([1, 2, 3]) == 3
+    sum([1, 2, 3]) == 6
+    product([2, 3, 4]) == 24
+    max([1, 5, 3]) == 5
+    min([1, 5, 3]) == 1
+    sort([3, 1, 2]) == [1, 2, 3]
+}
+
+# Arrays
+test_arrays {
+    array.concat([1, 2], [3, 4]) == [1, 2, 3, 4]
+    array.slice([1, 2, 3, 4], 1, 3) == [2, 3]
+    array.reverse([1, 2, 3]) == [3, 2, 1]
+}
+
+# Sets
+test_sets {
+    {1, 2} & {2, 3} == {2}
+    {1, 2} | {2, 3} == {1, 2, 3}
+    {1, 2, 3} - {2} == {1, 3}
+    intersection({{1, 2}, {2, 3}}) == {2}
+    union({{1, 2}, {2, 3}}) == {1, 2, 3}
+}
+
+# Objects
+test_objects {
+    object.get({"a": 1, "b": 2}, "a", 0) == 1
+    object.get({"a": 1, "b": 2}, "c", 0) == 0
+    object.remove({"a": 1, "b": 2}, ["a"]) == {"b": 2}
+    object.union({"a": 1}, {"b": 2}) == {"a": 1, "b": 2}
+}
+
+# Strings
+test_strings {
+    contains("abcde", "bc")
+    startswith("abcde", "ab")
+    endswith("abcde", "de")
+    lower("AbC") == "abc"
+    upper("aBc") == "ABC"
+    trim("  abc  ") == "abc"
+    split("a,b,c", ",") == ["a", "b", "c"]
+    replace("aabbcc", "b", "d") == "aaddcc"
+    sprintf("%s %d", ["foo", 5]) == "foo 5"
+}
+
+# Regex
+test_regex {
+    regex.match("^a[bc]+d$", "abcd")
+    regex.split(":", "a:b:c") == ["a", "b", "c"]
+    regex.find_n("[a-z]", "a1b2c3", -1) == ["a", "b", "c"]
+}
+
+# Glob
+test_glob {
+    glob.match("*.txt", ["."], "file.txt")
+    not glob.match("*.txt", ["."], "file.jpg")
+}
+
+# Type checks
+test_types {
+    is_number(5)
+    is_string("abc")
+    is_boolean(true)
+    is_array([1, 2, 3])
+    is_set({1, 2, 3})
+    is_object({"a": 1})
+    is_null(null)
+    type_name(5) == "number"
+}
+
+# Encoding
+test_encoding {
+    base64.encode("hello") == "aGVsbG8="
+    base64.decode("aGVsbG8=") == "hello"
+    json.marshal({"a": 1}) == "{\"a\":1}"
+    json.unmarshal("{\"a\":1}") == {"a": 1}
+}
+
+# Time
+test_time {
+    time.now_ns() > 0
+    time.parse_duration_ns("1h") == 3600000000000
+    parsed := time.parse_rfc3339_ns("2006-01-02T15:04:05Z")
+    [year, month, day] := time.date(parsed)
+    year == 2006
+    month == 1
+    day == 2
+}
+
+# Crypto
+test_crypto {
+    crypto.md5("hello") == "5d41402abc4b2a76b9719d911017c592"
+    crypto.sha1("hello") == "aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d"
+    crypto.sha256("hello") == "2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824"
+}
+
+# Net
+test_net {
+    net.cidr_contains("192.168.1.0/24", "192.168.1.100")
+    not net.cidr_contains("192.168.1.0/24", "192.168.2.100")
+}
+
+# Graphs
+test_graphs {
+    graph := {"a": ["b", "c"], "b": ["d"], "c": ["d"], "d": []}
+    graph.reachable(graph, {"a"}) == {"a", "b", "c", "d"}
+}
+
+# HTTP and JWTs (mocked)
+mock_http_send(request) = http_response if {
+    request.url == "https://example.com"
+    http_response := {
+        "status": "200 OK",
+        "status_code": 200,
+        "body": "{\"key\": \"value\"}",
+    }
+}
+
+test_http_and_jwt {
+    http.send({"method": "GET", "url": "https://example.com"}) == mock_http_send({"method": "GET", "url": "https://example.com"})
+    io.jwt.encode_sign({"alg": "HS256"}, {"sub": "1234567890"}, {"kty": "oct", "k": "secret"})
+}
+
+# UUID
+test_uuid {
+    uuid := uuid.rfc4122("test")
+    startswith(uuid, "")  # Always true, just to use the uuid variable
+    uuid2 := uuid.rfc4122("test")
+    uuid == uuid2  # Consistent for the same input
+}
+
+# Rego
+test_rego {
+    parsed := rego.parse_module("test.rego", "package test")
+    parsed.package.path[0].value == "test"
+}
+
+# OPA Runtime
+test_opa_runtime {
+    runtime := opa.runtime()
+    is_object(runtime)
+}
+
+---tokens---
+'package'     Keyword
+' '           Text.Whitespace
+'test_builtins' Name
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'# Comparison' Comment.Single
+'\n'          Text.Whitespace
+
+'test_comparison' Name
+' '           Text.Whitespace
+'{'           Punctuation
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'1'           Literal.Number
+' '           Text.Whitespace
+'=='          Operator
+' '           Text.Whitespace
+'1'           Literal.Number
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'1'           Literal.Number
+' '           Text.Whitespace
+'!='          Operator
+' '           Text.Whitespace
+'2'           Literal.Number
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'2'           Literal.Number
+' '           Text.Whitespace
+'>'           Operator
+' '           Text.Whitespace
+'1'           Literal.Number
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'2'           Literal.Number
+' '           Text.Whitespace
+'>='          Operator
+' '           Text.Whitespace
+'2'           Literal.Number
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'1'           Literal.Number
+' '           Text.Whitespace
+'<'           Operator
+' '           Text.Whitespace
+'2'           Literal.Number
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'1'           Literal.Number
+' '           Text.Whitespace
+'<='          Operator
+' '           Text.Whitespace
+'1'           Literal.Number
+'\n'          Text.Whitespace
+
+'}'           Punctuation
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'# Numbers'   Comment.Single
+'\n'          Text.Whitespace
+
+'test_numbers' Name
+' '           Text.Whitespace
+'{'           Punctuation
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'abs'         Name
+'('           Punctuation
+'-5'          Literal.Number
+')'           Punctuation
+' '           Text.Whitespace
+'=='          Operator
+' '           Text.Whitespace
+'5'           Literal.Number
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'ceil'        Name
+'('           Punctuation
+'3.7'         Literal.Number
+')'           Punctuation
+' '           Text.Whitespace
+'=='          Operator
+' '           Text.Whitespace
+'4'           Literal.Number
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'floor'       Name
+'('           Punctuation
+'3.7'         Literal.Number
+')'           Punctuation
+' '           Text.Whitespace
+'=='          Operator
+' '           Text.Whitespace
+'3'           Literal.Number
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'round'       Name
+'('           Punctuation
+'3.5'         Literal.Number
+')'           Punctuation
+' '           Text.Whitespace
+'=='          Operator
+' '           Text.Whitespace
+'4'           Literal.Number
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'numbers'     Name
+'.'           Punctuation
+'range'       Name
+'('           Punctuation
+'1'           Literal.Number
+','           Punctuation
+' '           Text.Whitespace
+'3'           Literal.Number
+')'           Punctuation
+' '           Text.Whitespace
+'=='          Operator
+' '           Text.Whitespace
+'['           Punctuation
+'1'           Literal.Number
+','           Punctuation
+' '           Text.Whitespace
+'2'           Literal.Number
+','           Punctuation
+' '           Text.Whitespace
+'3'           Literal.Number
+']'           Punctuation
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'7'           Literal.Number
+' '           Text.Whitespace
+'/'           Operator
+' '           Text.Whitespace
+'2'           Literal.Number
+' '           Text.Whitespace
+'=='          Operator
+' '           Text.Whitespace
+'3.5'         Literal.Number
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'7'           Literal.Number
+' '           Text.Whitespace
+'%'           Operator
+' '           Text.Whitespace
+'3'           Literal.Number
+' '           Text.Whitespace
+'=='          Operator
+' '           Text.Whitespace
+'1'           Literal.Number
+'\n'          Text.Whitespace
+
+'}'           Punctuation
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'# Aggregates' Comment.Single
+'\n'          Text.Whitespace
+
+'test_aggregates' Name
+' '           Text.Whitespace
+'{'           Punctuation
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'count'       Name
+'('           Punctuation
+'['           Punctuation
+'1'           Literal.Number
+','           Punctuation
+' '           Text.Whitespace
+'2'           Literal.Number
+','           Punctuation
+' '           Text.Whitespace
+'3'           Literal.Number
+']'           Punctuation
+')'           Punctuation
+' '           Text.Whitespace
+'=='          Operator
+' '           Text.Whitespace
+'3'           Literal.Number
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'sum'         Name
+'('           Punctuation
+'['           Punctuation
+'1'           Literal.Number
+','           Punctuation
+' '           Text.Whitespace
+'2'           Literal.Number
+','           Punctuation
+' '           Text.Whitespace
+'3'           Literal.Number
+']'           Punctuation
+')'           Punctuation
+' '           Text.Whitespace
+'=='          Operator
+' '           Text.Whitespace
+'6'           Literal.Number
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'product'     Name
+'('           Punctuation
+'['           Punctuation
+'2'           Literal.Number
+','           Punctuation
+' '           Text.Whitespace
+'3'           Literal.Number
+','           Punctuation
+' '           Text.Whitespace
+'4'           Literal.Number
+']'           Punctuation
+')'           Punctuation
+' '           Text.Whitespace
+'=='          Operator
+' '           Text.Whitespace
+'24'          Literal.Number
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'max'         Name
+'('           Punctuation
+'['           Punctuation
+'1'           Literal.Number
+','           Punctuation
+' '           Text.Whitespace
+'5'           Literal.Number
+','           Punctuation
+' '           Text.Whitespace
+'3'           Literal.Number
+']'           Punctuation
+')'           Punctuation
+' '           Text.Whitespace
+'=='          Operator
+' '           Text.Whitespace
+'5'           Literal.Number
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'min'         Name
+'('           Punctuation
+'['           Punctuation
+'1'           Literal.Number
+','           Punctuation
+' '           Text.Whitespace
+'5'           Literal.Number
+','           Punctuation
+' '           Text.Whitespace
+'3'           Literal.Number
+']'           Punctuation
+')'           Punctuation
+' '           Text.Whitespace
+'=='          Operator
+' '           Text.Whitespace
+'1'           Literal.Number
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'sort'        Name
+'('           Punctuation
+'['           Punctuation
+'3'           Literal.Number
+','           Punctuation
+' '           Text.Whitespace
+'1'           Literal.Number
+','           Punctuation
+' '           Text.Whitespace
+'2'           Literal.Number
+']'           Punctuation
+')'           Punctuation
+' '           Text.Whitespace
+'=='          Operator
+' '           Text.Whitespace
+'['           Punctuation
+'1'           Literal.Number
+','           Punctuation
+' '           Text.Whitespace
+'2'           Literal.Number
+','           Punctuation
+' '           Text.Whitespace
+'3'           Literal.Number
+']'           Punctuation
+'\n'          Text.Whitespace
+
+'}'           Punctuation
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'# Arrays'    Comment.Single
+'\n'          Text.Whitespace
+
+'test_arrays' Name
+' '           Text.Whitespace
+'{'           Punctuation
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'array'       Name
+'.'           Punctuation
+'concat'      Name
+'('           Punctuation
+'['           Punctuation
+'1'           Literal.Number
+','           Punctuation
+' '           Text.Whitespace
+'2'           Literal.Number
+']'           Punctuation
+','           Punctuation
+' '           Text.Whitespace
+'['           Punctuation
+'3'           Literal.Number
+','           Punctuation
+' '           Text.Whitespace
+'4'           Literal.Number
+']'           Punctuation
+')'           Punctuation
+' '           Text.Whitespace
+'=='          Operator
+' '           Text.Whitespace
+'['           Punctuation
+'1'           Literal.Number
+','           Punctuation
+' '           Text.Whitespace
+'2'           Literal.Number
+','           Punctuation
+' '           Text.Whitespace
+'3'           Literal.Number
+','           Punctuation
+' '           Text.Whitespace
+'4'           Literal.Number
+']'           Punctuation
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'array'       Name
+'.'           Punctuation
+'slice'       Name
+'('           Punctuation
+'['           Punctuation
+'1'           Literal.Number
+','           Punctuation
+' '           Text.Whitespace
+'2'           Literal.Number
+','           Punctuation
+' '           Text.Whitespace
+'3'           Literal.Number
+','           Punctuation
+' '           Text.Whitespace
+'4'           Literal.Number
+']'           Punctuation
+','           Punctuation
+' '           Text.Whitespace
+'1'           Literal.Number
+','           Punctuation
+' '           Text.Whitespace
+'3'           Literal.Number
+')'           Punctuation
+' '           Text.Whitespace
+'=='          Operator
+' '           Text.Whitespace
+'['           Punctuation
+'2'           Literal.Number
+','           Punctuation
+' '           Text.Whitespace
+'3'           Literal.Number
+']'           Punctuation
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'array'       Name
+'.'           Punctuation
+'reverse'     Name
+'('           Punctuation
+'['           Punctuation
+'1'           Literal.Number
+','           Punctuation
+' '           Text.Whitespace
+'2'           Literal.Number
+','           Punctuation
+' '           Text.Whitespace
+'3'           Literal.Number
+']'           Punctuation
+')'           Punctuation
+' '           Text.Whitespace
+'=='          Operator
+' '           Text.Whitespace
+'['           Punctuation
+'3'           Literal.Number
+','           Punctuation
+' '           Text.Whitespace
+'2'           Literal.Number
+','           Punctuation
+' '           Text.Whitespace
+'1'           Literal.Number
+']'           Punctuation
+'\n'          Text.Whitespace
+
+'}'           Punctuation
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'# Sets'      Comment.Single
+'\n'          Text.Whitespace
+
+'test_sets'   Name
+' '           Text.Whitespace
+'{'           Punctuation
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'{'           Punctuation
+'1'           Literal.Number
+','           Punctuation
+' '           Text.Whitespace
+'2'           Literal.Number
+'}'           Punctuation
+' '           Text.Whitespace
+'&'           Operator
+' '           Text.Whitespace
+'{'           Punctuation
+'2'           Literal.Number
+','           Punctuation
+' '           Text.Whitespace
+'3'           Literal.Number
+'}'           Punctuation
+' '           Text.Whitespace
+'=='          Operator
+' '           Text.Whitespace
+'{'           Punctuation
+'2'           Literal.Number
+'}'           Punctuation
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'{'           Punctuation
+'1'           Literal.Number
+','           Punctuation
+' '           Text.Whitespace
+'2'           Literal.Number
+'}'           Punctuation
+' '           Text.Whitespace
+'|'           Operator
+' '           Text.Whitespace
+'{'           Punctuation
+'2'           Literal.Number
+','           Punctuation
+' '           Text.Whitespace
+'3'           Literal.Number
+'}'           Punctuation
+' '           Text.Whitespace
+'=='          Operator
+' '           Text.Whitespace
+'{'           Punctuation
+'1'           Literal.Number
+','           Punctuation
+' '           Text.Whitespace
+'2'           Literal.Number
+','           Punctuation
+' '           Text.Whitespace
+'3'           Literal.Number
+'}'           Punctuation
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'{'           Punctuation
+'1'           Literal.Number
+','           Punctuation
+' '           Text.Whitespace
+'2'           Literal.Number
+','           Punctuation
+' '           Text.Whitespace
+'3'           Literal.Number
+'}'           Punctuation
+' '           Text.Whitespace
+'-'           Operator
+' '           Text.Whitespace
+'{'           Punctuation
+'2'           Literal.Number
+'}'           Punctuation
+' '           Text.Whitespace
+'=='          Operator
+' '           Text.Whitespace
+'{'           Punctuation
+'1'           Literal.Number
+','           Punctuation
+' '           Text.Whitespace
+'3'           Literal.Number
+'}'           Punctuation
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'intersection' Name
+'('           Punctuation
+'{'           Punctuation
+'{'           Punctuation
+'1'           Literal.Number
+','           Punctuation
+' '           Text.Whitespace
+'2'           Literal.Number
+'}'           Punctuation
+','           Punctuation
+' '           Text.Whitespace
+'{'           Punctuation
+'2'           Literal.Number
+','           Punctuation
+' '           Text.Whitespace
+'3'           Literal.Number
+'}'           Punctuation
+'}'           Punctuation
+')'           Punctuation
+' '           Text.Whitespace
+'=='          Operator
+' '           Text.Whitespace
+'{'           Punctuation
+'2'           Literal.Number
+'}'           Punctuation
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'union'       Name
+'('           Punctuation
+'{'           Punctuation
+'{'           Punctuation
+'1'           Literal.Number
+','           Punctuation
+' '           Text.Whitespace
+'2'           Literal.Number
+'}'           Punctuation
+','           Punctuation
+' '           Text.Whitespace
+'{'           Punctuation
+'2'           Literal.Number
+','           Punctuation
+' '           Text.Whitespace
+'3'           Literal.Number
+'}'           Punctuation
+'}'           Punctuation
+')'           Punctuation
+' '           Text.Whitespace
+'=='          Operator
+' '           Text.Whitespace
+'{'           Punctuation
+'1'           Literal.Number
+','           Punctuation
+' '           Text.Whitespace
+'2'           Literal.Number
+','           Punctuation
+' '           Text.Whitespace
+'3'           Literal.Number
+'}'           Punctuation
+'\n'          Text.Whitespace
+
+'}'           Punctuation
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'# Objects'   Comment.Single
+'\n'          Text.Whitespace
+
+'test_objects' Name
+' '           Text.Whitespace
+'{'           Punctuation
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'object'      Name
+'.'           Punctuation
+'get'         Name
+'('           Punctuation
+'{'           Punctuation
+'"a"'         Literal.String.Double
+':'           Punctuation
+' '           Text.Whitespace
+'1'           Literal.Number
+','           Punctuation
+' '           Text.Whitespace
+'"b"'         Literal.String.Double
+':'           Punctuation
+' '           Text.Whitespace
+'2'           Literal.Number
+'}'           Punctuation
+','           Punctuation
+' '           Text.Whitespace
+'"a"'         Literal.String.Double
+','           Punctuation
+' '           Text.Whitespace
+'0'           Literal.Number
+')'           Punctuation
+' '           Text.Whitespace
+'=='          Operator
+' '           Text.Whitespace
+'1'           Literal.Number
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'object'      Name
+'.'           Punctuation
+'get'         Name
+'('           Punctuation
+'{'           Punctuation
+'"a"'         Literal.String.Double
+':'           Punctuation
+' '           Text.Whitespace
+'1'           Literal.Number
+','           Punctuation
+' '           Text.Whitespace
+'"b"'         Literal.String.Double
+':'           Punctuation
+' '           Text.Whitespace
+'2'           Literal.Number
+'}'           Punctuation
+','           Punctuation
+' '           Text.Whitespace
+'"c"'         Literal.String.Double
+','           Punctuation
+' '           Text.Whitespace
+'0'           Literal.Number
+')'           Punctuation
+' '           Text.Whitespace
+'=='          Operator
+' '           Text.Whitespace
+'0'           Literal.Number
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'object'      Name
+'.'           Punctuation
+'remove'      Name
+'('           Punctuation
+'{'           Punctuation
+'"a"'         Literal.String.Double
+':'           Punctuation
+' '           Text.Whitespace
+'1'           Literal.Number
+','           Punctuation
+' '           Text.Whitespace
+'"b"'         Literal.String.Double
+':'           Punctuation
+' '           Text.Whitespace
+'2'           Literal.Number
+'}'           Punctuation
+','           Punctuation
+' '           Text.Whitespace
+'['           Punctuation
+'"a"'         Literal.String.Double
+']'           Punctuation
+')'           Punctuation
+' '           Text.Whitespace
+'=='          Operator
+' '           Text.Whitespace
+'{'           Punctuation
+'"b"'         Literal.String.Double
+':'           Punctuation
+' '           Text.Whitespace
+'2'           Literal.Number
+'}'           Punctuation
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'object'      Name
+'.'           Punctuation
+'union'       Name
+'('           Punctuation
+'{'           Punctuation
+'"a"'         Literal.String.Double
+':'           Punctuation
+' '           Text.Whitespace
+'1'           Literal.Number
+'}'           Punctuation
+','           Punctuation
+' '           Text.Whitespace
+'{'           Punctuation
+'"b"'         Literal.String.Double
+':'           Punctuation
+' '           Text.Whitespace
+'2'           Literal.Number
+'}'           Punctuation
+')'           Punctuation
+' '           Text.Whitespace
+'=='          Operator
+' '           Text.Whitespace
+'{'           Punctuation
+'"a"'         Literal.String.Double
+':'           Punctuation
+' '           Text.Whitespace
+'1'           Literal.Number
+','           Punctuation
+' '           Text.Whitespace
+'"b"'         Literal.String.Double
+':'           Punctuation
+' '           Text.Whitespace
+'2'           Literal.Number
+'}'           Punctuation
+'\n'          Text.Whitespace
+
+'}'           Punctuation
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'# Strings'   Comment.Single
+'\n'          Text.Whitespace
+
+'test_strings' Name
+' '           Text.Whitespace
+'{'           Punctuation
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'contains'    Keyword
+'('           Punctuation
+'"abcde"'     Literal.String.Double
+','           Punctuation
+' '           Text.Whitespace
+'"bc"'        Literal.String.Double
+')'           Punctuation
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'startswith'  Name
+'('           Punctuation
+'"abcde"'     Literal.String.Double
+','           Punctuation
+' '           Text.Whitespace
+'"ab"'        Literal.String.Double
+')'           Punctuation
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'endswith'    Name
+'('           Punctuation
+'"abcde"'     Literal.String.Double
+','           Punctuation
+' '           Text.Whitespace
+'"de"'        Literal.String.Double
+')'           Punctuation
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'lower'       Name
+'('           Punctuation
+'"AbC"'       Literal.String.Double
+')'           Punctuation
+' '           Text.Whitespace
+'=='          Operator
+' '           Text.Whitespace
+'"abc"'       Literal.String.Double
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'upper'       Name
+'('           Punctuation
+'"aBc"'       Literal.String.Double
+')'           Punctuation
+' '           Text.Whitespace
+'=='          Operator
+' '           Text.Whitespace
+'"ABC"'       Literal.String.Double
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'trim'        Name
+'('           Punctuation
+'"  abc  "'   Literal.String.Double
+')'           Punctuation
+' '           Text.Whitespace
+'=='          Operator
+' '           Text.Whitespace
+'"abc"'       Literal.String.Double
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'split'       Name
+'('           Punctuation
+'"a,b,c"'     Literal.String.Double
+','           Punctuation
+' '           Text.Whitespace
+'","'         Literal.String.Double
+')'           Punctuation
+' '           Text.Whitespace
+'=='          Operator
+' '           Text.Whitespace
+'['           Punctuation
+'"a"'         Literal.String.Double
+','           Punctuation
+' '           Text.Whitespace
+'"b"'         Literal.String.Double
+','           Punctuation
+' '           Text.Whitespace
+'"c"'         Literal.String.Double
+']'           Punctuation
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'replace'     Name
+'('           Punctuation
+'"aabbcc"'    Literal.String.Double
+','           Punctuation
+' '           Text.Whitespace
+'"b"'         Literal.String.Double
+','           Punctuation
+' '           Text.Whitespace
+'"d"'         Literal.String.Double
+')'           Punctuation
+' '           Text.Whitespace
+'=='          Operator
+' '           Text.Whitespace
+'"aaddcc"'    Literal.String.Double
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'sprintf'     Name
+'('           Punctuation
+'"%s %d"'     Literal.String.Double
+','           Punctuation
+' '           Text.Whitespace
+'['           Punctuation
+'"foo"'       Literal.String.Double
+','           Punctuation
+' '           Text.Whitespace
+'5'           Literal.Number
+']'           Punctuation
+')'           Punctuation
+' '           Text.Whitespace
+'=='          Operator
+' '           Text.Whitespace
+'"foo 5"'     Literal.String.Double
+'\n'          Text.Whitespace
+
+'}'           Punctuation
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'# Regex'     Comment.Single
+'\n'          Text.Whitespace
+
+'test_regex'  Name
+' '           Text.Whitespace
+'{'           Punctuation
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'regex'       Name
+'.'           Punctuation
+'match'       Name
+'('           Punctuation
+'"^a[bc]+d$"' Literal.String.Double
+','           Punctuation
+' '           Text.Whitespace
+'"abcd"'      Literal.String.Double
+')'           Punctuation
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'regex'       Name
+'.'           Punctuation
+'split'       Name
+'('           Punctuation
+'":"'         Literal.String.Double
+','           Punctuation
+' '           Text.Whitespace
+'"a:b:c"'     Literal.String.Double
+')'           Punctuation
+' '           Text.Whitespace
+'=='          Operator
+' '           Text.Whitespace
+'['           Punctuation
+'"a"'         Literal.String.Double
+','           Punctuation
+' '           Text.Whitespace
+'"b"'         Literal.String.Double
+','           Punctuation
+' '           Text.Whitespace
+'"c"'         Literal.String.Double
+']'           Punctuation
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'regex'       Name
+'.'           Punctuation
+'find_n'      Name
+'('           Punctuation
+'"[a-z]"'     Literal.String.Double
+','           Punctuation
+' '           Text.Whitespace
+'"a1b2c3"'    Literal.String.Double
+','           Punctuation
+' '           Text.Whitespace
+'-1'          Literal.Number
+')'           Punctuation
+' '           Text.Whitespace
+'=='          Operator
+' '           Text.Whitespace
+'['           Punctuation
+'"a"'         Literal.String.Double
+','           Punctuation
+' '           Text.Whitespace
+'"b"'         Literal.String.Double
+','           Punctuation
+' '           Text.Whitespace
+'"c"'         Literal.String.Double
+']'           Punctuation
+'\n'          Text.Whitespace
+
+'}'           Punctuation
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'# Glob'      Comment.Single
+'\n'          Text.Whitespace
+
+'test_glob'   Name
+' '           Text.Whitespace
+'{'           Punctuation
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'glob'        Name
+'.'           Punctuation
+'match'       Name
+'('           Punctuation
+'"*.txt"'     Literal.String.Double
+','           Punctuation
+' '           Text.Whitespace
+'['           Punctuation
+'"."'         Literal.String.Double
+']'           Punctuation
+','           Punctuation
+' '           Text.Whitespace
+'"file.txt"'  Literal.String.Double
+')'           Punctuation
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'not'         Keyword
+' '           Text.Whitespace
+'glob'        Name
+'.'           Punctuation
+'match'       Name
+'('           Punctuation
+'"*.txt"'     Literal.String.Double
+','           Punctuation
+' '           Text.Whitespace
+'['           Punctuation
+'"."'         Literal.String.Double
+']'           Punctuation
+','           Punctuation
+' '           Text.Whitespace
+'"file.jpg"'  Literal.String.Double
+')'           Punctuation
+'\n'          Text.Whitespace
+
+'}'           Punctuation
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'# Type checks' Comment.Single
+'\n'          Text.Whitespace
+
+'test_types'  Name
+' '           Text.Whitespace
+'{'           Punctuation
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'is_number'   Name
+'('           Punctuation
+'5'           Literal.Number
+')'           Punctuation
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'is_string'   Name
+'('           Punctuation
+'"abc"'       Literal.String.Double
+')'           Punctuation
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'is_boolean'  Name
+'('           Punctuation
+'true'        Keyword
+')'           Punctuation
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'is_array'    Name
+'('           Punctuation
+'['           Punctuation
+'1'           Literal.Number
+','           Punctuation
+' '           Text.Whitespace
+'2'           Literal.Number
+','           Punctuation
+' '           Text.Whitespace
+'3'           Literal.Number
+']'           Punctuation
+')'           Punctuation
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'is_set'      Name
+'('           Punctuation
+'{'           Punctuation
+'1'           Literal.Number
+','           Punctuation
+' '           Text.Whitespace
+'2'           Literal.Number
+','           Punctuation
+' '           Text.Whitespace
+'3'           Literal.Number
+'}'           Punctuation
+')'           Punctuation
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'is_object'   Name
+'('           Punctuation
+'{'           Punctuation
+'"a"'         Literal.String.Double
+':'           Punctuation
+' '           Text.Whitespace
+'1'           Literal.Number
+'}'           Punctuation
+')'           Punctuation
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'is_null'     Name
+'('           Punctuation
+'null'        Keyword
+')'           Punctuation
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'type_name'   Name
+'('           Punctuation
+'5'           Literal.Number
+')'           Punctuation
+' '           Text.Whitespace
+'=='          Operator
+' '           Text.Whitespace
+'"number"'    Literal.String.Double
+'\n'          Text.Whitespace
+
+'}'           Punctuation
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'# Encoding'  Comment.Single
+'\n'          Text.Whitespace
+
+'test_encoding' Name
+' '           Text.Whitespace
+'{'           Punctuation
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'base64'      Name
+'.'           Punctuation
+'encode'      Name
+'('           Punctuation
+'"hello"'     Literal.String.Double
+')'           Punctuation
+' '           Text.Whitespace
+'=='          Operator
+' '           Text.Whitespace
+'"aGVsbG8="'  Literal.String.Double
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'base64'      Name
+'.'           Punctuation
+'decode'      Name
+'('           Punctuation
+'"aGVsbG8="'  Literal.String.Double
+')'           Punctuation
+' '           Text.Whitespace
+'=='          Operator
+' '           Text.Whitespace
+'"hello"'     Literal.String.Double
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'json'        Name
+'.'           Punctuation
+'marshal'     Name
+'('           Punctuation
+'{'           Punctuation
+'"a"'         Literal.String.Double
+':'           Punctuation
+' '           Text.Whitespace
+'1'           Literal.Number
+'}'           Punctuation
+')'           Punctuation
+' '           Text.Whitespace
+'=='          Operator
+' '           Text.Whitespace
+'"{\\"a\\":1}"' Literal.String.Double
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'json'        Name
+'.'           Punctuation
+'unmarshal'   Name
+'('           Punctuation
+'"{\\"a\\":1}"' Literal.String.Double
+')'           Punctuation
+' '           Text.Whitespace
+'=='          Operator
+' '           Text.Whitespace
+'{'           Punctuation
+'"a"'         Literal.String.Double
+':'           Punctuation
+' '           Text.Whitespace
+'1'           Literal.Number
+'}'           Punctuation
+'\n'          Text.Whitespace
+
+'}'           Punctuation
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'# Time'      Comment.Single
+'\n'          Text.Whitespace
+
+'test_time'   Name
+' '           Text.Whitespace
+'{'           Punctuation
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'time'        Name
+'.'           Punctuation
+'now_ns'      Name
+'('           Punctuation
+')'           Punctuation
+' '           Text.Whitespace
+'>'           Operator
+' '           Text.Whitespace
+'0'           Literal.Number
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'time'        Name
+'.'           Punctuation
+'parse_duration_ns' Name
+'('           Punctuation
+'"1h"'        Literal.String.Double
+')'           Punctuation
+' '           Text.Whitespace
+'=='          Operator
+' '           Text.Whitespace
+'3600000000000' Literal.Number
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'parsed'      Name
+' '           Text.Whitespace
+':='          Operator
+' '           Text.Whitespace
+'time'        Name
+'.'           Punctuation
+'parse_rfc3339_ns' Name
+'('           Punctuation
+'"2006-01-02T15:04:05Z"' Literal.String.Double
+')'           Punctuation
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'['           Punctuation
+'year'        Name
+','           Punctuation
+' '           Text.Whitespace
+'month'       Name
+','           Punctuation
+' '           Text.Whitespace
+'day'         Name
+']'           Punctuation
+' '           Text.Whitespace
+':='          Operator
+' '           Text.Whitespace
+'time'        Name
+'.'           Punctuation
+'date'        Name
+'('           Punctuation
+'parsed'      Name
+')'           Punctuation
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'year'        Name
+' '           Text.Whitespace
+'=='          Operator
+' '           Text.Whitespace
+'2006'        Literal.Number
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'month'       Name
+' '           Text.Whitespace
+'=='          Operator
+' '           Text.Whitespace
+'1'           Literal.Number
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'day'         Name
+' '           Text.Whitespace
+'=='          Operator
+' '           Text.Whitespace
+'2'           Literal.Number
+'\n'          Text.Whitespace
+
+'}'           Punctuation
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'# Crypto'    Comment.Single
+'\n'          Text.Whitespace
+
+'test_crypto' Name
+' '           Text.Whitespace
+'{'           Punctuation
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'crypto'      Name
+'.'           Punctuation
+'md5'         Name
+'('           Punctuation
+'"hello"'     Literal.String.Double
+')'           Punctuation
+' '           Text.Whitespace
+'=='          Operator
+' '           Text.Whitespace
+'"5d41402abc4b2a76b9719d911017c592"' Literal.String.Double
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'crypto'      Name
+'.'           Punctuation
+'sha1'        Name
+'('           Punctuation
+'"hello"'     Literal.String.Double
+')'           Punctuation
+' '           Text.Whitespace
+'=='          Operator
+' '           Text.Whitespace
+'"aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d"' Literal.String.Double
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'crypto'      Name
+'.'           Punctuation
+'sha256'      Name
+'('           Punctuation
+'"hello"'     Literal.String.Double
+')'           Punctuation
+' '           Text.Whitespace
+'=='          Operator
+' '           Text.Whitespace
+'"2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824"' Literal.String.Double
+'\n'          Text.Whitespace
+
+'}'           Punctuation
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'# Net'       Comment.Single
+'\n'          Text.Whitespace
+
+'test_net'    Name
+' '           Text.Whitespace
+'{'           Punctuation
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'net'         Name
+'.'           Punctuation
+'cidr_contains' Name
+'('           Punctuation
+'"192.168.1.0/24"' Literal.String.Double
+','           Punctuation
+' '           Text.Whitespace
+'"192.168.1.100"' Literal.String.Double
+')'           Punctuation
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'not'         Keyword
+' '           Text.Whitespace
+'net'         Name
+'.'           Punctuation
+'cidr_contains' Name
+'('           Punctuation
+'"192.168.1.0/24"' Literal.String.Double
+','           Punctuation
+' '           Text.Whitespace
+'"192.168.2.100"' Literal.String.Double
+')'           Punctuation
+'\n'          Text.Whitespace
+
+'}'           Punctuation
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'# Graphs'    Comment.Single
+'\n'          Text.Whitespace
+
+'test_graphs' Name
+' '           Text.Whitespace
+'{'           Punctuation
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'graph'       Name
+' '           Text.Whitespace
+':='          Operator
+' '           Text.Whitespace
+'{'           Punctuation
+'"a"'         Literal.String.Double
+':'           Punctuation
+' '           Text.Whitespace
+'['           Punctuation
+'"b"'         Literal.String.Double
+','           Punctuation
+' '           Text.Whitespace
+'"c"'         Literal.String.Double
+']'           Punctuation
+','           Punctuation
+' '           Text.Whitespace
+'"b"'         Literal.String.Double
+':'           Punctuation
+' '           Text.Whitespace
+'['           Punctuation
+'"d"'         Literal.String.Double
+']'           Punctuation
+','           Punctuation
+' '           Text.Whitespace
+'"c"'         Literal.String.Double
+':'           Punctuation
+' '           Text.Whitespace
+'['           Punctuation
+'"d"'         Literal.String.Double
+']'           Punctuation
+','           Punctuation
+' '           Text.Whitespace
+'"d"'         Literal.String.Double
+':'           Punctuation
+' '           Text.Whitespace
+'['           Punctuation
+']'           Punctuation
+'}'           Punctuation
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'graph'       Name
+'.'           Punctuation
+'reachable'   Name
+'('           Punctuation
+'graph'       Name
+','           Punctuation
+' '           Text.Whitespace
+'{'           Punctuation
+'"a"'         Literal.String.Double
+'}'           Punctuation
+')'           Punctuation
+' '           Text.Whitespace
+'=='          Operator
+' '           Text.Whitespace
+'{'           Punctuation
+'"a"'         Literal.String.Double
+','           Punctuation
+' '           Text.Whitespace
+'"b"'         Literal.String.Double
+','           Punctuation
+' '           Text.Whitespace
+'"c"'         Literal.String.Double
+','           Punctuation
+' '           Text.Whitespace
+'"d"'         Literal.String.Double
+'}'           Punctuation
+'\n'          Text.Whitespace
+
+'}'           Punctuation
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'# HTTP and JWTs (mocked)' Comment.Single
+'\n'          Text.Whitespace
+
+'mock_http_send' Name
+'('           Punctuation
+'request'     Name
+')'           Punctuation
+' '           Text.Whitespace
+'='           Operator
+' '           Text.Whitespace
+'http_response' Name
+' '           Text.Whitespace
+'if'          Keyword
+' '           Text.Whitespace
+'{'           Punctuation
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'request'     Name
+'.'           Punctuation
+'url'         Name
+' '           Text.Whitespace
+'=='          Operator
+' '           Text.Whitespace
+'"https://example.com"' Literal.String.Double
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'http_response' Name
+' '           Text.Whitespace
+':='          Operator
+' '           Text.Whitespace
+'{'           Punctuation
+'\n'          Text.Whitespace
+
+'        '    Text.Whitespace
+'"status"'    Literal.String.Double
+':'           Punctuation
+' '           Text.Whitespace
+'"200 OK"'    Literal.String.Double
+','           Punctuation
+'\n'          Text.Whitespace
+
+'        '    Text.Whitespace
+'"status_code"' Literal.String.Double
+':'           Punctuation
+' '           Text.Whitespace
+'200'         Literal.Number
+','           Punctuation
+'\n'          Text.Whitespace
+
+'        '    Text.Whitespace
+'"body"'      Literal.String.Double
+':'           Punctuation
+' '           Text.Whitespace
+'"{\\"key\\": \\"value\\"}"' Literal.String.Double
+','           Punctuation
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'}'           Punctuation
+'\n'          Text.Whitespace
+
+'}'           Punctuation
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'test_http_and_jwt' Name
+' '           Text.Whitespace
+'{'           Punctuation
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'http'        Name
+'.'           Punctuation
+'send'        Name
+'('           Punctuation
+'{'           Punctuation
+'"method"'    Literal.String.Double
+':'           Punctuation
+' '           Text.Whitespace
+'"GET"'       Literal.String.Double
+','           Punctuation
+' '           Text.Whitespace
+'"url"'       Literal.String.Double
+':'           Punctuation
+' '           Text.Whitespace
+'"https://example.com"' Literal.String.Double
+'}'           Punctuation
+')'           Punctuation
+' '           Text.Whitespace
+'=='          Operator
+' '           Text.Whitespace
+'mock_http_send' Name
+'('           Punctuation
+'{'           Punctuation
+'"method"'    Literal.String.Double
+':'           Punctuation
+' '           Text.Whitespace
+'"GET"'       Literal.String.Double
+','           Punctuation
+' '           Text.Whitespace
+'"url"'       Literal.String.Double
+':'           Punctuation
+' '           Text.Whitespace
+'"https://example.com"' Literal.String.Double
+'}'           Punctuation
+')'           Punctuation
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'io'          Name
+'.'           Punctuation
+'jwt'         Name
+'.'           Punctuation
+'encode_sign' Name
+'('           Punctuation
+'{'           Punctuation
+'"alg"'       Literal.String.Double
+':'           Punctuation
+' '           Text.Whitespace
+'"HS256"'     Literal.String.Double
+'}'           Punctuation
+','           Punctuation
+' '           Text.Whitespace
+'{'           Punctuation
+'"sub"'       Literal.String.Double
+':'           Punctuation
+' '           Text.Whitespace
+'"1234567890"' Literal.String.Double
+'}'           Punctuation
+','           Punctuation
+' '           Text.Whitespace
+'{'           Punctuation
+'"kty"'       Literal.String.Double
+':'           Punctuation
+' '           Text.Whitespace
+'"oct"'       Literal.String.Double
+','           Punctuation
+' '           Text.Whitespace
+'"k"'         Literal.String.Double
+':'           Punctuation
+' '           Text.Whitespace
+'"secret"'    Literal.String.Double
+'}'           Punctuation
+')'           Punctuation
+'\n'          Text.Whitespace
+
+'}'           Punctuation
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'# UUID'      Comment.Single
+'\n'          Text.Whitespace
+
+'test_uuid'   Name
+' '           Text.Whitespace
+'{'           Punctuation
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'uuid'        Name
+' '           Text.Whitespace
+':='          Operator
+' '           Text.Whitespace
+'uuid'        Name
+'.'           Punctuation
+'rfc4122'     Name
+'('           Punctuation
+'"test"'      Literal.String.Double
+')'           Punctuation
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'startswith'  Name
+'('           Punctuation
+'uuid'        Name
+','           Punctuation
+' '           Text.Whitespace
+'""'          Literal.String.Double
+')'           Punctuation
+'  '          Text.Whitespace
+'# Always true, just to use the uuid variable' Comment.Single
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'uuid2'       Name
+' '           Text.Whitespace
+':='          Operator
+' '           Text.Whitespace
+'uuid'        Name
+'.'           Punctuation
+'rfc4122'     Name
+'('           Punctuation
+'"test"'      Literal.String.Double
+')'           Punctuation
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'uuid'        Name
+' '           Text.Whitespace
+'=='          Operator
+' '           Text.Whitespace
+'uuid2'       Name
+'  '          Text.Whitespace
+'# Consistent for the same input' Comment.Single
+'\n'          Text.Whitespace
+
+'}'           Punctuation
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'# Rego'      Comment.Single
+'\n'          Text.Whitespace
+
+'test_rego'   Name
+' '           Text.Whitespace
+'{'           Punctuation
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'parsed'      Name
+' '           Text.Whitespace
+':='          Operator
+' '           Text.Whitespace
+'rego'        Name
+'.'           Punctuation
+'parse_module' Name
+'('           Punctuation
+'"test.rego"' Literal.String.Double
+','           Punctuation
+' '           Text.Whitespace
+'"package test"' Literal.String.Double
+')'           Punctuation
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'parsed'      Name
+'.'           Punctuation
+'package'     Keyword
+'.'           Punctuation
+'path'        Name
+'['           Punctuation
+'0'           Literal.Number
+']'           Punctuation
+'.'           Punctuation
+'value'       Name
+' '           Text.Whitespace
+'=='          Operator
+' '           Text.Whitespace
+'"test"'      Literal.String.Double
+'\n'          Text.Whitespace
+
+'}'           Punctuation
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'# OPA Runtime' Comment.Single
+'\n'          Text.Whitespace
+
+'test_opa_runtime' Name
+' '           Text.Whitespace
+'{'           Punctuation
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'runtime'     Name
+' '           Text.Whitespace
+':='          Operator
+' '           Text.Whitespace
+'opa'         Name
+'.'           Punctuation
+'runtime'     Name
+'('           Punctuation
+')'           Punctuation
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'is_object'   Name
+'('           Punctuation
+'runtime'     Name
+')'           Punctuation
+'\n'          Text.Whitespace
+
+'}'           Punctuation
+'\n'          Text.Whitespace
diff --git a/tests/snippets/rego/test_for_all.txt b/tests/snippets/rego/test_for_all.txt
new file mode 100644
index 00000000..f4a1dae3
--- /dev/null
+++ b/tests/snippets/rego/test_for_all.txt
@@ -0,0 +1,187 @@
+---input---
+package example
+
+# Rego Policy References: https://www.openpolicyagent.org/docs/latest/policy-reference/
+
+# assert no values in set match predicate
+count({x | set[x]; f(x)}) == 0
+
+# assert all values in set make function f true
+count({x | set[x]; f(x)}) == count(set)
+
+# assert no values in set make function f true (using negation and helper rule)
+not any_match
+
+# assert all values in set make function f true (using negation and helper rule)
+not any_not_match
+
+
+# with `import rego.v1`, or `import future.keywords.in` and `import future.keywords.if`
+any_match if {
+    some x in set
+    f(x)
+}
+
+any_not_match if {
+    some x in set
+    not f(x)
+}
+
+---tokens---
+'package'     Keyword
+' '           Text.Whitespace
+'example'     Name
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'# Rego Policy References: https://www.openpolicyagent.org/docs/latest/policy-reference/' Comment.Single
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'# assert no values in set match predicate' Comment.Single
+'\n'          Text.Whitespace
+
+'count'       Name
+'('           Punctuation
+'{'           Punctuation
+'x'           Name
+' '           Text.Whitespace
+'|'           Operator
+' '           Text.Whitespace
+'set'         Name
+'['           Punctuation
+'x'           Name
+']'           Punctuation
+';'           Punctuation
+' '           Text.Whitespace
+'f'           Name
+'('           Punctuation
+'x'           Name
+')'           Punctuation
+'}'           Punctuation
+')'           Punctuation
+' '           Text.Whitespace
+'=='          Operator
+' '           Text.Whitespace
+'0'           Literal.Number
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'# assert all values in set make function f true' Comment.Single
+'\n'          Text.Whitespace
+
+'count'       Name
+'('           Punctuation
+'{'           Punctuation
+'x'           Name
+' '           Text.Whitespace
+'|'           Operator
+' '           Text.Whitespace
+'set'         Name
+'['           Punctuation
+'x'           Name
+']'           Punctuation
+';'           Punctuation
+' '           Text.Whitespace
+'f'           Name
+'('           Punctuation
+'x'           Name
+')'           Punctuation
+'}'           Punctuation
+')'           Punctuation
+' '           Text.Whitespace
+'=='          Operator
+' '           Text.Whitespace
+'count'       Name
+'('           Punctuation
+'set'         Name
+')'           Punctuation
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'# assert no values in set make function f true (using negation and helper rule)' Comment.Single
+'\n'          Text.Whitespace
+
+'not'         Keyword
+' '           Text.Whitespace
+'any_match'   Name
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'# assert all values in set make function f true (using negation and helper rule)' Comment.Single
+'\n'          Text.Whitespace
+
+'not'         Keyword
+' '           Text.Whitespace
+'any_not_match' Name
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'# with `import rego.v1`, or `import future.keywords.in` and `import future.keywords.if`' Comment.Single
+'\n'          Text.Whitespace
+
+'any_match'   Name
+' '           Text.Whitespace
+'if'          Keyword
+' '           Text.Whitespace
+'{'           Punctuation
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'some'        Keyword
+' '           Text.Whitespace
+'x'           Name
+' '           Text.Whitespace
+'in'          Keyword
+' '           Text.Whitespace
+'set'         Name
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'f'           Name
+'('           Punctuation
+'x'           Name
+')'           Punctuation
+'\n'          Text.Whitespace
+
+'}'           Punctuation
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'any_not_match' Name
+' '           Text.Whitespace
+'if'          Keyword
+' '           Text.Whitespace
+'{'           Punctuation
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'some'        Keyword
+' '           Text.Whitespace
+'x'           Name
+' '           Text.Whitespace
+'in'          Keyword
+' '           Text.Whitespace
+'set'         Name
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'not'         Keyword
+' '           Text.Whitespace
+'f'           Name
+'('           Punctuation
+'x'           Name
+')'           Punctuation
+'\n'          Text.Whitespace
+
+'}'           Punctuation
+'\n'          Text.Whitespace
diff --git a/tests/snippets/rego/test_iteration.txt b/tests/snippets/rego/test_iteration.txt
new file mode 100644
index 00000000..1c97f71e
--- /dev/null
+++ b/tests/snippets/rego/test_iteration.txt
@@ -0,0 +1,392 @@
+---input---
+package example
+
+# Rego Policy References: https://www.openpolicyagent.org/docs/latest/policy-reference/
+
+### Arrays
+
+# iterate over indices i
+arr[i]
+
+# iterate over values
+val := arr[_]
+
+# iterate over index/value pairs
+val := arr[i]
+
+# with `import rego.v1` or `import future.keywords.in`
+some val in arr    # iterate over values
+some i, _ in arr   # iterate over indices
+some i, val in arr # iterate over index/value pairs
+
+
+### Objects
+
+# iterate over keys
+obj[key]
+
+# iterate over values
+val := obj[_]
+
+# iterate over key/value pairs
+val := obj[key]
+
+# with `import rego.v1` or `import future.keywords.in`
+some val in obj      # iterate over values
+some key, _ in obj   # iterate over keys
+some key, val in obj # key/value pairs
+
+
+### Sets
+
+# iterate over values
+set[val]
+
+# with `import rego.v1` or `import future.keywords.in`
+some val in set
+
+
+### Advanced
+
+# nested: find key k whose bar.baz array index i is 7
+foo[k].bar.baz[i] == 7
+
+# simultaneous: find keys in objects foo and bar with same value
+foo[k1] == bar[k2]
+
+# simultaneous self: find 2 keys in object foo with same value
+foo[k1] == foo[k2]; k1 != k2
+
+# multiple conditions: k has same value in both conditions
+foo[k].bar.baz[i] == 7; foo[k].qux > 3
+
+---tokens---
+'package'     Keyword
+' '           Text.Whitespace
+'example'     Name
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'# Rego Policy References: https://www.openpolicyagent.org/docs/latest/policy-reference/' Comment.Single
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'### Arrays'  Comment.Single
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'# iterate over indices i' Comment.Single
+'\n'          Text.Whitespace
+
+'arr'         Name
+'['           Punctuation
+'i'           Name
+']'           Punctuation
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'# iterate over values' Comment.Single
+'\n'          Text.Whitespace
+
+'val'         Name
+' '           Text.Whitespace
+':='          Operator
+' '           Text.Whitespace
+'arr'         Name
+'['           Punctuation
+'_'           Name
+']'           Punctuation
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'# iterate over index/value pairs' Comment.Single
+'\n'          Text.Whitespace
+
+'val'         Name
+' '           Text.Whitespace
+':='          Operator
+' '           Text.Whitespace
+'arr'         Name
+'['           Punctuation
+'i'           Name
+']'           Punctuation
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'# with `import rego.v1` or `import future.keywords.in`' Comment.Single
+'\n'          Text.Whitespace
+
+'some'        Keyword
+' '           Text.Whitespace
+'val'         Name
+' '           Text.Whitespace
+'in'          Keyword
+' '           Text.Whitespace
+'arr'         Name
+'    '        Text.Whitespace
+'# iterate over values' Comment.Single
+'\n'          Text.Whitespace
+
+'some'        Keyword
+' '           Text.Whitespace
+'i'           Name
+','           Punctuation
+' '           Text.Whitespace
+'_'           Name
+' '           Text.Whitespace
+'in'          Keyword
+' '           Text.Whitespace
+'arr'         Name
+'   '         Text.Whitespace
+'# iterate over indices' Comment.Single
+'\n'          Text.Whitespace
+
+'some'        Keyword
+' '           Text.Whitespace
+'i'           Name
+','           Punctuation
+' '           Text.Whitespace
+'val'         Name
+' '           Text.Whitespace
+'in'          Keyword
+' '           Text.Whitespace
+'arr'         Name
+' '           Text.Whitespace
+'# iterate over index/value pairs' Comment.Single
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'### Objects' Comment.Single
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'# iterate over keys' Comment.Single
+'\n'          Text.Whitespace
+
+'obj'         Name
+'['           Punctuation
+'key'         Name
+']'           Punctuation
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'# iterate over values' Comment.Single
+'\n'          Text.Whitespace
+
+'val'         Name
+' '           Text.Whitespace
+':='          Operator
+' '           Text.Whitespace
+'obj'         Name
+'['           Punctuation
+'_'           Name
+']'           Punctuation
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'# iterate over key/value pairs' Comment.Single
+'\n'          Text.Whitespace
+
+'val'         Name
+' '           Text.Whitespace
+':='          Operator
+' '           Text.Whitespace
+'obj'         Name
+'['           Punctuation
+'key'         Name
+']'           Punctuation
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'# with `import rego.v1` or `import future.keywords.in`' Comment.Single
+'\n'          Text.Whitespace
+
+'some'        Keyword
+' '           Text.Whitespace
+'val'         Name
+' '           Text.Whitespace
+'in'          Keyword
+' '           Text.Whitespace
+'obj'         Name
+'      '      Text.Whitespace
+'# iterate over values' Comment.Single
+'\n'          Text.Whitespace
+
+'some'        Keyword
+' '           Text.Whitespace
+'key'         Name
+','           Punctuation
+' '           Text.Whitespace
+'_'           Name
+' '           Text.Whitespace
+'in'          Keyword
+' '           Text.Whitespace
+'obj'         Name
+'   '         Text.Whitespace
+'# iterate over keys' Comment.Single
+'\n'          Text.Whitespace
+
+'some'        Keyword
+' '           Text.Whitespace
+'key'         Name
+','           Punctuation
+' '           Text.Whitespace
+'val'         Name
+' '           Text.Whitespace
+'in'          Keyword
+' '           Text.Whitespace
+'obj'         Name
+' '           Text.Whitespace
+'# key/value pairs' Comment.Single
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'### Sets'    Comment.Single
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'# iterate over values' Comment.Single
+'\n'          Text.Whitespace
+
+'set'         Name
+'['           Punctuation
+'val'         Name
+']'           Punctuation
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'# with `import rego.v1` or `import future.keywords.in`' Comment.Single
+'\n'          Text.Whitespace
+
+'some'        Keyword
+' '           Text.Whitespace
+'val'         Name
+' '           Text.Whitespace
+'in'          Keyword
+' '           Text.Whitespace
+'set'         Name
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'### Advanced' Comment.Single
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'# nested: find key k whose bar.baz array index i is 7' Comment.Single
+'\n'          Text.Whitespace
+
+'foo'         Name
+'['           Punctuation
+'k'           Name
+']'           Punctuation
+'.'           Punctuation
+'bar'         Name
+'.'           Punctuation
+'baz'         Name
+'['           Punctuation
+'i'           Name
+']'           Punctuation
+' '           Text.Whitespace
+'=='          Operator
+' '           Text.Whitespace
+'7'           Literal.Number
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'# simultaneous: find keys in objects foo and bar with same value' Comment.Single
+'\n'          Text.Whitespace
+
+'foo'         Name
+'['           Punctuation
+'k1'          Name
+']'           Punctuation
+' '           Text.Whitespace
+'=='          Operator
+' '           Text.Whitespace
+'bar'         Name
+'['           Punctuation
+'k2'          Name
+']'           Punctuation
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'# simultaneous self: find 2 keys in object foo with same value' Comment.Single
+'\n'          Text.Whitespace
+
+'foo'         Name
+'['           Punctuation
+'k1'          Name
+']'           Punctuation
+' '           Text.Whitespace
+'=='          Operator
+' '           Text.Whitespace
+'foo'         Name
+'['           Punctuation
+'k2'          Name
+']'           Punctuation
+';'           Punctuation
+' '           Text.Whitespace
+'k1'          Name
+' '           Text.Whitespace
+'!='          Operator
+' '           Text.Whitespace
+'k2'          Name
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'# multiple conditions: k has same value in both conditions' Comment.Single
+'\n'          Text.Whitespace
+
+'foo'         Name
+'['           Punctuation
+'k'           Name
+']'           Punctuation
+'.'           Punctuation
+'bar'         Name
+'.'           Punctuation
+'baz'         Name
+'['           Punctuation
+'i'           Name
+']'           Punctuation
+' '           Text.Whitespace
+'=='          Operator
+' '           Text.Whitespace
+'7'           Literal.Number
+';'           Punctuation
+' '           Text.Whitespace
+'foo'         Name
+'['           Punctuation
+'k'           Name
+']'           Punctuation
+'.'           Punctuation
+'qux'         Name
+' '           Text.Whitespace
+'>'           Operator
+' '           Text.Whitespace
+'3'           Literal.Number
+'\n'          Text.Whitespace
diff --git a/tests/snippets/rego/test_lookup.txt b/tests/snippets/rego/test_lookup.txt
new file mode 100644
index 00000000..95a9bb9d
--- /dev/null
+++ b/tests/snippets/rego/test_lookup.txt
@@ -0,0 +1,472 @@
+---input---
+package example
+
+# Rego Policy References: https://www.openpolicyagent.org/docs/latest/policy-reference/
+
+### Arrays
+
+# lookup value at index 0
+val := arr[0]
+
+ # check if value at index 0 is "foo"
+"foo" == arr[0]
+
+# find all indices i that have value "foo"
+"foo" == arr[i]
+
+# lookup last value
+val := arr[count(arr)-1]
+
+# with `import rego.v1` or `import future.keywords.in`
+some 0, val in arr   # lookup value at index 0
+0, "foo" in arr      # check if value at index 0 is "foo"
+some i, "foo" in arr # find all indices i that have value "foo"
+
+### Objects
+
+# lookup value for key "foo"
+val := obj["foo"]
+
+# check if value for key "foo" is "bar"
+"bar" == obj["foo"]
+
+# OR
+
+"bar" == obj.foo
+
+# check if key "foo" exists and is not false
+obj.foo
+
+# check if key assigned to variable k exists
+k := "foo"
+obj[k]
+
+# check if path foo.bar.baz exists and is not false
+obj.foo.bar.baz
+
+# check if path foo.bar.baz, foo.bar, or foo does not exist or is false
+not obj.foo.bar.baz
+
+# with `import rego.v1` or `import future.keywords.in`
+o := {"foo": false}
+# check if value exists: the expression will be true
+false in o
+# check if value for key "foo" is false
+"foo", false in o
+
+### Sets
+
+# check if "foo" belongs to the set
+a_set["foo"]
+
+# check if "foo" DOES NOT belong to the set
+not a_set["foo"]
+
+# check if the array ["a", "b", "c"] belongs to the set
+a_set[["a", "b", "c"]]
+
+# find all arrays of the form [x, "b", z] in the set
+a_set[[x, "b", z]]
+
+# with `import rego.v1` or `import future.keywords.in`
+"foo" in a_set
+not "foo" in a_set
+some ["a", "b", "c"] in a_set
+some [x, "b", z] in a_set
+
+---tokens---
+'package'     Keyword
+' '           Text.Whitespace
+'example'     Name
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'# Rego Policy References: https://www.openpolicyagent.org/docs/latest/policy-reference/' Comment.Single
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'### Arrays'  Comment.Single
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'# lookup value at index 0' Comment.Single
+'\n'          Text.Whitespace
+
+'val'         Name
+' '           Text.Whitespace
+':='          Operator
+' '           Text.Whitespace
+'arr'         Name
+'['           Punctuation
+'0'           Literal.Number
+']'           Punctuation
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+' '           Text.Whitespace
+'# check if value at index 0 is "foo"' Comment.Single
+'\n'          Text.Whitespace
+
+'"foo"'       Literal.String.Double
+' '           Text.Whitespace
+'=='          Operator
+' '           Text.Whitespace
+'arr'         Name
+'['           Punctuation
+'0'           Literal.Number
+']'           Punctuation
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'# find all indices i that have value "foo"' Comment.Single
+'\n'          Text.Whitespace
+
+'"foo"'       Literal.String.Double
+' '           Text.Whitespace
+'=='          Operator
+' '           Text.Whitespace
+'arr'         Name
+'['           Punctuation
+'i'           Name
+']'           Punctuation
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'# lookup last value' Comment.Single
+'\n'          Text.Whitespace
+
+'val'         Name
+' '           Text.Whitespace
+':='          Operator
+' '           Text.Whitespace
+'arr'         Name
+'['           Punctuation
+'count'       Name
+'('           Punctuation
+'arr'         Name
+')'           Punctuation
+'-1'          Literal.Number
+']'           Punctuation
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'# with `import rego.v1` or `import future.keywords.in`' Comment.Single
+'\n'          Text.Whitespace
+
+'some'        Keyword
+' '           Text.Whitespace
+'0'           Literal.Number
+','           Punctuation
+' '           Text.Whitespace
+'val'         Name
+' '           Text.Whitespace
+'in'          Keyword
+' '           Text.Whitespace
+'arr'         Name
+'   '         Text.Whitespace
+'# lookup value at index 0' Comment.Single
+'\n'          Text.Whitespace
+
+'0'           Literal.Number
+','           Punctuation
+' '           Text.Whitespace
+'"foo"'       Literal.String.Double
+' '           Text.Whitespace
+'in'          Keyword
+' '           Text.Whitespace
+'arr'         Name
+'      '      Text.Whitespace
+'# check if value at index 0 is "foo"' Comment.Single
+'\n'          Text.Whitespace
+
+'some'        Keyword
+' '           Text.Whitespace
+'i'           Name
+','           Punctuation
+' '           Text.Whitespace
+'"foo"'       Literal.String.Double
+' '           Text.Whitespace
+'in'          Keyword
+' '           Text.Whitespace
+'arr'         Name
+' '           Text.Whitespace
+'# find all indices i that have value "foo"' Comment.Single
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'### Objects' Comment.Single
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'# lookup value for key "foo"' Comment.Single
+'\n'          Text.Whitespace
+
+'val'         Name
+' '           Text.Whitespace
+':='          Operator
+' '           Text.Whitespace
+'obj'         Name
+'['           Punctuation
+'"foo"'       Literal.String.Double
+']'           Punctuation
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'# check if value for key "foo" is "bar"' Comment.Single
+'\n'          Text.Whitespace
+
+'"bar"'       Literal.String.Double
+' '           Text.Whitespace
+'=='          Operator
+' '           Text.Whitespace
+'obj'         Name
+'['           Punctuation
+'"foo"'       Literal.String.Double
+']'           Punctuation
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'# OR'        Comment.Single
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'"bar"'       Literal.String.Double
+' '           Text.Whitespace
+'=='          Operator
+' '           Text.Whitespace
+'obj'         Name
+'.'           Punctuation
+'foo'         Name
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'# check if key "foo" exists and is not false' Comment.Single
+'\n'          Text.Whitespace
+
+'obj'         Name
+'.'           Punctuation
+'foo'         Name
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'# check if key assigned to variable k exists' Comment.Single
+'\n'          Text.Whitespace
+
+'k'           Name
+' '           Text.Whitespace
+':='          Operator
+' '           Text.Whitespace
+'"foo"'       Literal.String.Double
+'\n'          Text.Whitespace
+
+'obj'         Name
+'['           Punctuation
+'k'           Name
+']'           Punctuation
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'# check if path foo.bar.baz exists and is not false' Comment.Single
+'\n'          Text.Whitespace
+
+'obj'         Name
+'.'           Punctuation
+'foo'         Name
+'.'           Punctuation
+'bar'         Name
+'.'           Punctuation
+'baz'         Name
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'# check if path foo.bar.baz, foo.bar, or foo does not exist or is false' Comment.Single
+'\n'          Text.Whitespace
+
+'not'         Keyword
+' '           Text.Whitespace
+'obj'         Name
+'.'           Punctuation
+'foo'         Name
+'.'           Punctuation
+'bar'         Name
+'.'           Punctuation
+'baz'         Name
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'# with `import rego.v1` or `import future.keywords.in`' Comment.Single
+'\n'          Text.Whitespace
+
+'o'           Name
+' '           Text.Whitespace
+':='          Operator
+' '           Text.Whitespace
+'{'           Punctuation
+'"foo"'       Literal.String.Double
+':'           Punctuation
+' '           Text.Whitespace
+'false'       Keyword
+'}'           Punctuation
+'\n'          Text.Whitespace
+
+'# check if value exists: the expression will be true' Comment.Single
+'\n'          Text.Whitespace
+
+'false'       Keyword
+' '           Text.Whitespace
+'in'          Keyword
+' '           Text.Whitespace
+'o'           Name
+'\n'          Text.Whitespace
+
+'# check if value for key "foo" is false' Comment.Single
+'\n'          Text.Whitespace
+
+'"foo"'       Literal.String.Double
+','           Punctuation
+' '           Text.Whitespace
+'false'       Keyword
+' '           Text.Whitespace
+'in'          Keyword
+' '           Text.Whitespace
+'o'           Name
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'### Sets'    Comment.Single
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'# check if "foo" belongs to the set' Comment.Single
+'\n'          Text.Whitespace
+
+'a_set'       Name
+'['           Punctuation
+'"foo"'       Literal.String.Double
+']'           Punctuation
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'# check if "foo" DOES NOT belong to the set' Comment.Single
+'\n'          Text.Whitespace
+
+'not'         Keyword
+' '           Text.Whitespace
+'a_set'       Name
+'['           Punctuation
+'"foo"'       Literal.String.Double
+']'           Punctuation
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'# check if the array ["a", "b", "c"] belongs to the set' Comment.Single
+'\n'          Text.Whitespace
+
+'a_set'       Name
+'['           Punctuation
+'['           Punctuation
+'"a"'         Literal.String.Double
+','           Punctuation
+' '           Text.Whitespace
+'"b"'         Literal.String.Double
+','           Punctuation
+' '           Text.Whitespace
+'"c"'         Literal.String.Double
+']'           Punctuation
+']'           Punctuation
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'# find all arrays of the form [x, "b", z] in the set' Comment.Single
+'\n'          Text.Whitespace
+
+'a_set'       Name
+'['           Punctuation
+'['           Punctuation
+'x'           Name
+','           Punctuation
+' '           Text.Whitespace
+'"b"'         Literal.String.Double
+','           Punctuation
+' '           Text.Whitespace
+'z'           Name
+']'           Punctuation
+']'           Punctuation
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'# with `import rego.v1` or `import future.keywords.in`' Comment.Single
+'\n'          Text.Whitespace
+
+'"foo"'       Literal.String.Double
+' '           Text.Whitespace
+'in'          Keyword
+' '           Text.Whitespace
+'a_set'       Name
+'\n'          Text.Whitespace
+
+'not'         Keyword
+' '           Text.Whitespace
+'"foo"'       Literal.String.Double
+' '           Text.Whitespace
+'in'          Keyword
+' '           Text.Whitespace
+'a_set'       Name
+'\n'          Text.Whitespace
+
+'some'        Keyword
+' '           Text.Whitespace
+'['           Punctuation
+'"a"'         Literal.String.Double
+','           Punctuation
+' '           Text.Whitespace
+'"b"'         Literal.String.Double
+','           Punctuation
+' '           Text.Whitespace
+'"c"'         Literal.String.Double
+']'           Punctuation
+' '           Text.Whitespace
+'in'          Keyword
+' '           Text.Whitespace
+'a_set'       Name
+'\n'          Text.Whitespace
+
+'some'        Keyword
+' '           Text.Whitespace
+'['           Punctuation
+'x'           Name
+','           Punctuation
+' '           Text.Whitespace
+'"b"'         Literal.String.Double
+','           Punctuation
+' '           Text.Whitespace
+'z'           Name
+']'           Punctuation
+' '           Text.Whitespace
+'in'          Keyword
+' '           Text.Whitespace
+'a_set'       Name
+'\n'          Text.Whitespace
diff --git a/tests/snippets/rego/test_rules.txt b/tests/snippets/rego/test_rules.txt
new file mode 100644
index 00000000..e8d122aa
--- /dev/null
+++ b/tests/snippets/rego/test_rules.txt
@@ -0,0 +1,749 @@
+---input---
+package example
+
+# Rego Policy References: https://www.openpolicyagent.org/docs/latest/policy-reference/
+
+### Constants
+
+a := {1, 2, 3}
+b := {4, 5, 6}
+c := a | b
+
+### Conditionals (Boolean)
+
+# p is true if ...
+p := true { 1 == 1 }
+
+# OR
+# with `import rego.v1` or `import future.keywords.if`
+p if { 2 > 1 }
+
+# OR
+p { 3 != 4 }
+
+
+### Conditionals
+
+# with `import rego.v1` or `import future.keywords.if`
+default a := 1
+a := 5   if { input.value > 3 }
+a := 100 if { input.value > 10 }
+
+
+### Incremental
+
+# a_set will contain values of x and values of y
+a_set[x] { x := [1, 2, 3][_] }
+a_set[y] { y := [4, 5, 6][_] }
+
+# alternatively, with `import rego.v1`, or `import future.keywords.contains` and `import future.keywords.if`
+a_set contains x if { x in [1, 2, 3] }
+a_set contains y if { y in [4, 5, 6] }
+
+# a_map will contain key->value pairs x->y and w->z
+a_map[x] := y if { x := "key1"; y := "value1" }
+a_map[w] := z if { w := "key2"; z := "value2" }
+
+
+### Functions (boolean)
+
+# with `import rego.v1` or `import future.keywords.if`
+f(x, y) if {
+    x < y
+}
+
+# OR
+
+f(x, y) := true if {
+    x + y > 10
+}
+
+### Functions (conditionals)
+
+# with `import rego.v1` or `import future.keywords.if`
+f(x) := "A" if { x >= 90 }
+f(x) := "B" if { x >= 80; x < 90 }
+f(x) := "C" if { x >= 70; x < 80 }
+
+
+### Reference Heads
+
+# with `import rego.v1`, or `import future.keywords.contains` and `import future.keywords.if`
+fruit.apple.seeds = 12 if input == "apple"             # complete document (single value rule)
+
+fruit.pineapple.colors contains x if x := "yellow"     # multi-value rule
+
+fruit.banana.phone[x] = "bananular" if x := "cellular" # single value rule
+fruit.banana.phone.cellular = "bananular" if true      # equivalent single value rule
+
+fruit.orange.color(x) = true if x == "orange"          # function
+
+---tokens---
+'package'     Keyword
+' '           Text.Whitespace
+'example'     Name
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'# Rego Policy References: https://www.openpolicyagent.org/docs/latest/policy-reference/' Comment.Single
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'### Constants' Comment.Single
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'a'           Name
+' '           Text.Whitespace
+':='          Operator
+' '           Text.Whitespace
+'{'           Punctuation
+'1'           Literal.Number
+','           Punctuation
+' '           Text.Whitespace
+'2'           Literal.Number
+','           Punctuation
+' '           Text.Whitespace
+'3'           Literal.Number
+'}'           Punctuation
+'\n'          Text.Whitespace
+
+'b'           Name
+' '           Text.Whitespace
+':='          Operator
+' '           Text.Whitespace
+'{'           Punctuation
+'4'           Literal.Number
+','           Punctuation
+' '           Text.Whitespace
+'5'           Literal.Number
+','           Punctuation
+' '           Text.Whitespace
+'6'           Literal.Number
+'}'           Punctuation
+'\n'          Text.Whitespace
+
+'c'           Name
+' '           Text.Whitespace
+':='          Operator
+' '           Text.Whitespace
+'a'           Name
+' '           Text.Whitespace
+'|'           Operator
+' '           Text.Whitespace
+'b'           Name
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'### Conditionals (Boolean)' Comment.Single
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'# p is true if ...' Comment.Single
+'\n'          Text.Whitespace
+
+'p'           Name
+' '           Text.Whitespace
+':='          Operator
+' '           Text.Whitespace
+'true'        Keyword
+' '           Text.Whitespace
+'{'           Punctuation
+' '           Text.Whitespace
+'1'           Literal.Number
+' '           Text.Whitespace
+'=='          Operator
+' '           Text.Whitespace
+'1'           Literal.Number
+' '           Text.Whitespace
+'}'           Punctuation
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'# OR'        Comment.Single
+'\n'          Text.Whitespace
+
+'# with `import rego.v1` or `import future.keywords.if`' Comment.Single
+'\n'          Text.Whitespace
+
+'p'           Name
+' '           Text.Whitespace
+'if'          Keyword
+' '           Text.Whitespace
+'{'           Punctuation
+' '           Text.Whitespace
+'2'           Literal.Number
+' '           Text.Whitespace
+'>'           Operator
+' '           Text.Whitespace
+'1'           Literal.Number
+' '           Text.Whitespace
+'}'           Punctuation
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'# OR'        Comment.Single
+'\n'          Text.Whitespace
+
+'p'           Name
+' '           Text.Whitespace
+'{'           Punctuation
+' '           Text.Whitespace
+'3'           Literal.Number
+' '           Text.Whitespace
+'!='          Operator
+' '           Text.Whitespace
+'4'           Literal.Number
+' '           Text.Whitespace
+'}'           Punctuation
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'### Conditionals' Comment.Single
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'# with `import rego.v1` or `import future.keywords.if`' Comment.Single
+'\n'          Text.Whitespace
+
+'default'     Keyword
+' '           Text.Whitespace
+'a'           Name
+' '           Text.Whitespace
+':='          Operator
+' '           Text.Whitespace
+'1'           Literal.Number
+'\n'          Text.Whitespace
+
+'a'           Name
+' '           Text.Whitespace
+':='          Operator
+' '           Text.Whitespace
+'5'           Literal.Number
+'   '         Text.Whitespace
+'if'          Keyword
+' '           Text.Whitespace
+'{'           Punctuation
+' '           Text.Whitespace
+'input'       Name.Builtin
+'.'           Punctuation
+'value'       Name
+' '           Text.Whitespace
+'>'           Operator
+' '           Text.Whitespace
+'3'           Literal.Number
+' '           Text.Whitespace
+'}'           Punctuation
+'\n'          Text.Whitespace
+
+'a'           Name
+' '           Text.Whitespace
+':='          Operator
+' '           Text.Whitespace
+'100'         Literal.Number
+' '           Text.Whitespace
+'if'          Keyword
+' '           Text.Whitespace
+'{'           Punctuation
+' '           Text.Whitespace
+'input'       Name.Builtin
+'.'           Punctuation
+'value'       Name
+' '           Text.Whitespace
+'>'           Operator
+' '           Text.Whitespace
+'10'          Literal.Number
+' '           Text.Whitespace
+'}'           Punctuation
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'### Incremental' Comment.Single
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'# a_set will contain values of x and values of y' Comment.Single
+'\n'          Text.Whitespace
+
+'a_set'       Name
+'['           Punctuation
+'x'           Name
+']'           Punctuation
+' '           Text.Whitespace
+'{'           Punctuation
+' '           Text.Whitespace
+'x'           Name
+' '           Text.Whitespace
+':='          Operator
+' '           Text.Whitespace
+'['           Punctuation
+'1'           Literal.Number
+','           Punctuation
+' '           Text.Whitespace
+'2'           Literal.Number
+','           Punctuation
+' '           Text.Whitespace
+'3'           Literal.Number
+']'           Punctuation
+'['           Punctuation
+'_'           Name
+']'           Punctuation
+' '           Text.Whitespace
+'}'           Punctuation
+'\n'          Text.Whitespace
+
+'a_set'       Name
+'['           Punctuation
+'y'           Name
+']'           Punctuation
+' '           Text.Whitespace
+'{'           Punctuation
+' '           Text.Whitespace
+'y'           Name
+' '           Text.Whitespace
+':='          Operator
+' '           Text.Whitespace
+'['           Punctuation
+'4'           Literal.Number
+','           Punctuation
+' '           Text.Whitespace
+'5'           Literal.Number
+','           Punctuation
+' '           Text.Whitespace
+'6'           Literal.Number
+']'           Punctuation
+'['           Punctuation
+'_'           Name
+']'           Punctuation
+' '           Text.Whitespace
+'}'           Punctuation
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'# alternatively, with `import rego.v1`, or `import future.keywords.contains` and `import future.keywords.if`' Comment.Single
+'\n'          Text.Whitespace
+
+'a_set'       Name
+' '           Text.Whitespace
+'contains'    Keyword
+' '           Text.Whitespace
+'x'           Name
+' '           Text.Whitespace
+'if'          Keyword
+' '           Text.Whitespace
+'{'           Punctuation
+' '           Text.Whitespace
+'x'           Name
+' '           Text.Whitespace
+'in'          Keyword
+' '           Text.Whitespace
+'['           Punctuation
+'1'           Literal.Number
+','           Punctuation
+' '           Text.Whitespace
+'2'           Literal.Number
+','           Punctuation
+' '           Text.Whitespace
+'3'           Literal.Number
+']'           Punctuation
+' '           Text.Whitespace
+'}'           Punctuation
+'\n'          Text.Whitespace
+
+'a_set'       Name
+' '           Text.Whitespace
+'contains'    Keyword
+' '           Text.Whitespace
+'y'           Name
+' '           Text.Whitespace
+'if'          Keyword
+' '           Text.Whitespace
+'{'           Punctuation
+' '           Text.Whitespace
+'y'           Name
+' '           Text.Whitespace
+'in'          Keyword
+' '           Text.Whitespace
+'['           Punctuation
+'4'           Literal.Number
+','           Punctuation
+' '           Text.Whitespace
+'5'           Literal.Number
+','           Punctuation
+' '           Text.Whitespace
+'6'           Literal.Number
+']'           Punctuation
+' '           Text.Whitespace
+'}'           Punctuation
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'# a_map will contain key->value pairs x->y and w->z' Comment.Single
+'\n'          Text.Whitespace
+
+'a_map'       Name
+'['           Punctuation
+'x'           Name
+']'           Punctuation
+' '           Text.Whitespace
+':='          Operator
+' '           Text.Whitespace
+'y'           Name
+' '           Text.Whitespace
+'if'          Keyword
+' '           Text.Whitespace
+'{'           Punctuation
+' '           Text.Whitespace
+'x'           Name
+' '           Text.Whitespace
+':='          Operator
+' '           Text.Whitespace
+'"key1"'      Literal.String.Double
+';'           Punctuation
+' '           Text.Whitespace
+'y'           Name
+' '           Text.Whitespace
+':='          Operator
+' '           Text.Whitespace
+'"value1"'    Literal.String.Double
+' '           Text.Whitespace
+'}'           Punctuation
+'\n'          Text.Whitespace
+
+'a_map'       Name
+'['           Punctuation
+'w'           Name
+']'           Punctuation
+' '           Text.Whitespace
+':='          Operator
+' '           Text.Whitespace
+'z'           Name
+' '           Text.Whitespace
+'if'          Keyword
+' '           Text.Whitespace
+'{'           Punctuation
+' '           Text.Whitespace
+'w'           Name
+' '           Text.Whitespace
+':='          Operator
+' '           Text.Whitespace
+'"key2"'      Literal.String.Double
+';'           Punctuation
+' '           Text.Whitespace
+'z'           Name
+' '           Text.Whitespace
+':='          Operator
+' '           Text.Whitespace
+'"value2"'    Literal.String.Double
+' '           Text.Whitespace
+'}'           Punctuation
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'### Functions (boolean)' Comment.Single
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'# with `import rego.v1` or `import future.keywords.if`' Comment.Single
+'\n'          Text.Whitespace
+
+'f'           Name
+'('           Punctuation
+'x'           Name
+','           Punctuation
+' '           Text.Whitespace
+'y'           Name
+')'           Punctuation
+' '           Text.Whitespace
+'if'          Keyword
+' '           Text.Whitespace
+'{'           Punctuation
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'x'           Name
+' '           Text.Whitespace
+'<'           Operator
+' '           Text.Whitespace
+'y'           Name
+'\n'          Text.Whitespace
+
+'}'           Punctuation
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'# OR'        Comment.Single
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'f'           Name
+'('           Punctuation
+'x'           Name
+','           Punctuation
+' '           Text.Whitespace
+'y'           Name
+')'           Punctuation
+' '           Text.Whitespace
+':='          Operator
+' '           Text.Whitespace
+'true'        Keyword
+' '           Text.Whitespace
+'if'          Keyword
+' '           Text.Whitespace
+'{'           Punctuation
+'\n'          Text.Whitespace
+
+'    '        Text.Whitespace
+'x'           Name
+' '           Text.Whitespace
+'+'           Operator
+' '           Text.Whitespace
+'y'           Name
+' '           Text.Whitespace
+'>'           Operator
+' '           Text.Whitespace
+'10'          Literal.Number
+'\n'          Text.Whitespace
+
+'}'           Punctuation
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'### Functions (conditionals)' Comment.Single
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'# with `import rego.v1` or `import future.keywords.if`' Comment.Single
+'\n'          Text.Whitespace
+
+'f'           Name
+'('           Punctuation
+'x'           Name
+')'           Punctuation
+' '           Text.Whitespace
+':='          Operator
+' '           Text.Whitespace
+'"A"'         Literal.String.Double
+' '           Text.Whitespace
+'if'          Keyword
+' '           Text.Whitespace
+'{'           Punctuation
+' '           Text.Whitespace
+'x'           Name
+' '           Text.Whitespace
+'>='          Operator
+' '           Text.Whitespace
+'90'          Literal.Number
+' '           Text.Whitespace
+'}'           Punctuation
+'\n'          Text.Whitespace
+
+'f'           Name
+'('           Punctuation
+'x'           Name
+')'           Punctuation
+' '           Text.Whitespace
+':='          Operator
+' '           Text.Whitespace
+'"B"'         Literal.String.Double
+' '           Text.Whitespace
+'if'          Keyword
+' '           Text.Whitespace
+'{'           Punctuation
+' '           Text.Whitespace
+'x'           Name
+' '           Text.Whitespace
+'>='          Operator
+' '           Text.Whitespace
+'80'          Literal.Number
+';'           Punctuation
+' '           Text.Whitespace
+'x'           Name
+' '           Text.Whitespace
+'<'           Operator
+' '           Text.Whitespace
+'90'          Literal.Number
+' '           Text.Whitespace
+'}'           Punctuation
+'\n'          Text.Whitespace
+
+'f'           Name
+'('           Punctuation
+'x'           Name
+')'           Punctuation
+' '           Text.Whitespace
+':='          Operator
+' '           Text.Whitespace
+'"C"'         Literal.String.Double
+' '           Text.Whitespace
+'if'          Keyword
+' '           Text.Whitespace
+'{'           Punctuation
+' '           Text.Whitespace
+'x'           Name
+' '           Text.Whitespace
+'>='          Operator
+' '           Text.Whitespace
+'70'          Literal.Number
+';'           Punctuation
+' '           Text.Whitespace
+'x'           Name
+' '           Text.Whitespace
+'<'           Operator
+' '           Text.Whitespace
+'80'          Literal.Number
+' '           Text.Whitespace
+'}'           Punctuation
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'### Reference Heads' Comment.Single
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'# with `import rego.v1`, or `import future.keywords.contains` and `import future.keywords.if`' Comment.Single
+'\n'          Text.Whitespace
+
+'fruit'       Name
+'.'           Punctuation
+'apple'       Name
+'.'           Punctuation
+'seeds'       Name
+' '           Text.Whitespace
+'='           Operator
+' '           Text.Whitespace
+'12'          Literal.Number
+' '           Text.Whitespace
+'if'          Keyword
+' '           Text.Whitespace
+'input'       Name.Builtin
+' '           Text.Whitespace
+'=='          Operator
+' '           Text.Whitespace
+'"apple"'     Literal.String.Double
+'             ' Text.Whitespace
+'# complete document (single value rule)' Comment.Single
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'fruit'       Name
+'.'           Punctuation
+'pineapple'   Name
+'.'           Punctuation
+'colors'      Name
+' '           Text.Whitespace
+'contains'    Keyword
+' '           Text.Whitespace
+'x'           Name
+' '           Text.Whitespace
+'if'          Keyword
+' '           Text.Whitespace
+'x'           Name
+' '           Text.Whitespace
+':='          Operator
+' '           Text.Whitespace
+'"yellow"'    Literal.String.Double
+'     '       Text.Whitespace
+'# multi-value rule' Comment.Single
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'fruit'       Name
+'.'           Punctuation
+'banana'      Name
+'.'           Punctuation
+'phone'       Name
+'['           Punctuation
+'x'           Name
+']'           Punctuation
+' '           Text.Whitespace
+'='           Operator
+' '           Text.Whitespace
+'"bananular"' Literal.String.Double
+' '           Text.Whitespace
+'if'          Keyword
+' '           Text.Whitespace
+'x'           Name
+' '           Text.Whitespace
+':='          Operator
+' '           Text.Whitespace
+'"cellular"'  Literal.String.Double
+' '           Text.Whitespace
+'# single value rule' Comment.Single
+'\n'          Text.Whitespace
+
+'fruit'       Name
+'.'           Punctuation
+'banana'      Name
+'.'           Punctuation
+'phone'       Name
+'.'           Punctuation
+'cellular'    Name
+' '           Text.Whitespace
+'='           Operator
+' '           Text.Whitespace
+'"bananular"' Literal.String.Double
+' '           Text.Whitespace
+'if'          Keyword
+' '           Text.Whitespace
+'true'        Keyword
+'      '      Text.Whitespace
+'# equivalent single value rule' Comment.Single
+'\n'          Text.Whitespace
+
+'\n'          Text.Whitespace
+
+'fruit'       Name
+'.'           Punctuation
+'orange'      Name
+'.'           Punctuation
+'color'       Name
+'('           Punctuation
+'x'           Name
+')'           Punctuation
+' '           Text.Whitespace
+'='           Operator
+' '           Text.Whitespace
+'true'        Keyword
+' '           Text.Whitespace
+'if'          Keyword
+' '           Text.Whitespace
+'x'           Name
+' '           Text.Whitespace
+'=='          Operator
+' '           Text.Whitespace
+'"orange"'    Literal.String.Double
+'          '  Text.Whitespace
+'# function'  Comment.Single
+'\n'          Text.Whitespace
diff --git a/tests/test_ruby.py b/tests/test_ruby.py
index bfa06eb6..9ddc3093 100644
--- a/tests/test_ruby.py
+++ b/tests/test_ruby.py
@@ -7,7 +7,6 @@
 """
 
 import pytest
-
 from pygments.token import Name
 from pygments.lexers.ruby import RubyLexer
 
diff --git a/tests/test_terminal_formatter.py b/tests/test_terminal_formatter.py
index 20ae9a90..3489c852 100644
--- a/tests/test_terminal_formatter.py
+++ b/tests/test_terminal_formatter.py
@@ -61,6 +61,7 @@ class MyStyle(Style):
         Token.String:     'ansibrightblue bg:ansired',
         Token.Number:     'ansibrightgreen bg:ansigreen',
         Token.Number.Hex: 'ansigreen bg:ansibrightred',
+        Token.Other:      '#3366AA'
     }
 
 
@@ -76,7 +77,8 @@ async def function(a,b,c, *d, **kwarg:Bool)->Bool:
 
 def test_style_html():
     style = HtmlFormatter(style=MyStyle).get_style_defs()
-    assert '#555555' in style, "ansigray for comment not html css style"
+    assert '#555' in style, "ansigray for comment not html css style"
+    assert '36A' in style, "6-character style was not shortened"
 
 
 def test_others_work():