Hack 代码生成工具 Hack Codegen

码农软件 · 软件分类 · 代码生成工具 · 2019-03-06 15:41:59

软件介绍

温馨提示:该项目除了使用 BSD 协议授权外,还需遵守附加的专利授权

Hack Codegen 是 Hack 代码生成工具,可以写入到已签名的文件,防止不期望的修改。Hack Codegen 的目的是提升抽象的层次,降低耦合。你可以用你自己的方式描述一个问题,然后生成相应的代码。

Hack Codegen 要求:

安装:

{
    "require": {
        "facebook/hack-codegen": "*"
    }
}

使用:

<?hh
require 'vendor/autoload.php';

echo codegen_file('HelloWorld.php')
  ->addClass(
    codegen_class('HelloWorld')
      ->addMethod(
        codegen_method('sayHi')
          ->setBody('echo "hello world\n";')
      )
  )->save();

Hack Codegen 包括:

  • Hack_builder to deal with the concatenation

  • New lines

  • Indentation

  • Braces

  • Hack keywords

  • Collections

  • Signed files to re-generate code automatically when a schema is changed

本文地址:https://codercto.com/soft/d/760.html

The Dream Machine

The Dream Machine

M. Mitchell Waldrop / Penguin Books / 2002-8 / USD 16.00

While most people may not be familiar with the name J. C. R. Licklider, he was the guiding spirit behind the greatest revolution of the modern era. At a time when most computers were big, ponderous ma......一起来看看 《The Dream Machine》 这本书的介绍吧!

JS 压缩/解压工具
JS 压缩/解压工具

在线压缩/解压 JS 代码

正则表达式在线测试
正则表达式在线测试

正则表达式在线测试

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具