Skip to content

Repository files navigation

NaiveC

A script interpreter supports simple grammar

can call Objective-C class and method directly, means you can write OC code as scripts

Grammar

  • variable initialization:
    aInt = 1
    aFloat = 0.5
    aStr = "helloworld"
    aArray = {1,2,3}
  • loop(for and while):
  for(i=0;i<16;i=i+1)

or

  for(e:arrObj) //if arrObj is a fast-enumerable object, such as native array or NSArray
  • conditional
  if(a>=0){
      print(a + " is greater than 0")
  }
  else{
      print(a + " is lower than 0")
  }
  • function call
  print("Hello world")

intergration with Objective-C and Cocoaframework

  • objc style send message
 time = [NSDate date]
 print(time)

About

Coding on iOS

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages