GithubHelp home page GithubHelp logo

xlang's Introduction

自制编程语言——xlang

类似与python + cpp语法的x语言,x语言解释器命名为xlang。

目前功能支持:

  1. 注释://、/* */
  2. 变量类型:int、float、string、list
  3. 变量定义、输出
  4. 运算符号:+、-、*、/、%
  5. 比较运算符:==、!=、>、<、>=、<=
  6. 逻辑运算符:&&、||
  7. 赋值运算符:=、+=、-=、*=、/=、%=
  8. 左++、右++、左--、右--
  9. 条件控制:if...else...
  10. 循环控制:for、while、do...while、break、continue
  11. 作用域:{}
  12. 函数:func定义、调用、return

计划实现:

  • 支持访问list中的list中的元素
  • 支持输出、调用list[2:3]、list[2:]、list[:2]
  • 增加bool类型——flase、true
  • 增加位运算符号——&、|、^、~、<<、>>
  • 增加list的in运算符号
  • 增加switch...case...default...
  • 支持最外层大括号可有可无
  • 增加输入功能——input
  • 增加错误信息输出

xlang's People

Stargazers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.