# -*- coding: utf-8 -*- # # frozen_string_literal: true module Rouge module Lexers load_lexer 'php.rb' class Hack < PHP title 'Hack' desc 'The Hack programming language (hacklang.org)' tag 'hack' aliases 'hack', 'hh' filenames '*.php', '*.hh' def self.detect?(text) return true if /<\?hh/ =~ text return true if text.shebang?('hhvm') return true if /async function [a-zA-Z]/ =~ text return true if /\): Awaitable