Giter Site home page Giter Site logo

hxtemplo's People

Contributors

andyli avatar gama11 avatar markknol avatar simn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

hxtemplo's Issues

Release the git version

The current git version works with latest Haxe, the current haxelib version doesn't, it gives errors.

C:\HaxeToolkit\haxe\lib\hxtemplo/3,0,0/templo/Parser.hx:18: characters 38-51 : Too many arguments
C:\HaxeToolkit\haxe\lib\hxtemplo/3,0,0/templo/Parser.hx:17: lines 17-19 : Missing super constructor call
C:\HaxeToolkit\haxe\lib\hxtemplo/3,0,0/templo/Parser.hx:398: characters 12-19 : Unknown identifier : ruleset
C:\HaxeToolkit\haxe\lib\hxtemplo/3,0,0/templo/Parser.hx:399: characters 2-9 : Unknown identifier : ruleset
C:\HaxeToolkit\haxe\lib\hxtemplo/3,0,0/templo/Parser.hx:399: characters 2-9 : Invalid assign
C:\HaxeToolkit\haxe\lib\hxtemplo/3,0,0/templo/Parser.hx:429: characters 2-9 : Unknown identifier : ruleset
C:\HaxeToolkit\haxe\lib\hxtemplo/3,0,0/templo/Parser.hx:429: characters 2-9 : Invalid assign
C:\HaxeToolkit\haxe\lib\hxtemplo/3,0,0/templo/Parser.hx:242: characters 2-9 : Unknown identifier : ruleset
C:\HaxeToolkit\haxe\lib\hxtemplo/3,0,0/templo/Parser.hx:242: characters 2-9 : Invalid assign
C:\HaxeToolkit\haxe\lib\hxtemplo/3,0,0/templo/Parser.hx:245: characters 4-11 : Unknown identifier : ruleset
C:\HaxeToolkit\haxe\lib\hxtemplo/3,0,0/templo/Parser.hx:245: characters 4-11 : Invalid assign
C:\HaxeToolkit\haxe\lib\hxtemplo/3,0,0/templo/Parser.hx:250: characters 4-11 : Unknown identifier : ruleset
C:\HaxeToolkit\haxe\lib\hxtemplo/3,0,0/templo/Parser.hx:250: characters 4-11 : Invalid assign
C:\HaxeToolkit\haxe\lib\hxtemplo/3,0,0/templo/Parser.hx:74: characters 2-9 : Unknown identifier : ruleset
C:\HaxeToolkit\haxe\lib\hxtemplo/3,0,0/templo/Parser.hx:74: characters 2-9 : Invalid assign
C:\HaxeToolkit\haxe\lib\hxtemplo/3,0,0/templo/Parser.hx:95: characters 4-11 : Unknown identifier : ruleset
C:\HaxeToolkit\haxe\lib\hxtemplo/3,0,0/templo/Parser.hx:95: characters 4-11 : Invalid assign
C:\HaxeToolkit\haxe\lib\hxtemplo/3,0,0/templo/Parser.hx:119: characters 4-11 : Unknown identifier : ruleset
C:\HaxeToolkit\haxe\lib\hxtemplo/3,0,0/templo/Parser.hx:119: characters 4-11 : Invalid assign
C:\HaxeToolkit\haxe\lib\hxtemplo/3,0,0/templo/Parser.hx:122: characters 4-11 : Unknown identifier : ruleset
C:\HaxeToolkit\haxe\lib\hxtemplo/3,0,0/templo/Parser.hx:122: characters 4-11 : Invalid assign
C:\HaxeToolkit\haxe\lib\hxtemplo/3,0,0/templo/Parser.hx:174: characters 12-19 : Unknown identifier : ruleset
C:\HaxeToolkit\haxe\lib\hxtemplo/3,0,0/templo/Parser.hx:175: characters 2-9 : Unknown identifier : ruleset
C:\HaxeToolkit\haxe\lib\hxtemplo/3,0,0/templo/Parser.hx:175: characters 2-9 : Invalid assign
C:\HaxeToolkit\haxe\lib\hxtemplo/3,0,0/templo/Parser.hx:235: characters 4-11 : Unknown identifier : ruleset
C:\HaxeToolkit\haxe\lib\hxtemplo/3,0,0/templo/Parser.hx:235: characters 4-11 : Invalid assign
C:\HaxeToolkit\haxe\lib\hxtemplo/3,0,0/templo/Parser.hx:183: characters 2-9 : Unknown identifier : ruleset
C:\HaxeToolkit\haxe\lib\hxtemplo/3,0,0/templo/Parser.hx:183: characters 2-9 : Invalid assign
C:\HaxeToolkit\haxe\lib\hxtemplo/3,0,0/templo/Parser.hx:126: characters 4-11 : Unknown identifier : ruleset
C:\HaxeToolkit\haxe\lib\hxtemplo/3,0,0/templo/Parser.hx:126: characters 4-11 : Invalid assign
C:\HaxeToolkit\haxe\lib\hxtemplo/3,0,0/templo/Parser.hx:76: characters 2-9 : Unknown identifier : ruleset
C:\HaxeToolkit\haxe\lib\hxtemplo/3,0,0/templo/Parser.hx:76: characters 2-9 : Invalid assign
C:\HaxeToolkit\haxe\lib\hxtemplo/3,0,0/templo/Parser.hx:279: characters 4-11 : Unknown identifier : ruleset
C:\HaxeToolkit\haxe\lib\hxtemplo/3,0,0/templo/Parser.hx:279: characters 4-11 : Invalid assign
C:\HaxeToolkit\haxe\lib\hxtemplo/3,0,0/templo/Parser.hx:50: characters 2-9 : Unknown identifier : ruleset
C:\HaxeToolkit\haxe\lib\hxtemplo/3,0,0/templo/Parser.hx:50: characters 2-9 : Invalid assign
C:\HaxeToolkit\haxe\lib\hxtemplo/3,0,0/templo/Parser.hx:59: characters 2-9 : Unknown identifier : ruleset
C:\HaxeToolkit\haxe\lib\hxtemplo/3,0,0/templo/Parser.hx:59: characters 2-9 : Invalid assign
C:\HaxeToolkit\haxe\lib\hxtemplo/3,0,0/templo/Parser.hx:16: lines 16-504 : Constraint check failure for hxparse.Parser.S
C:\HaxeToolkit\haxe\lib\hxtemplo/3,0,0/templo/Parser.hx:16: lines 16-504 : templo.Lexer should be hxparse.TokenSource<templo.Token>
C:\HaxeToolkit\haxe\lib\hxtemplo/3,0,0/templo/Parser.hx:16: lines 16-504 : templo.Lexer should be { token : Void -> templo.Token, curPos : Void -> hxparse.Position }
C:\HaxeToolkit\haxe\lib\hxtemplo/3,0,0/templo/Parser.hx:16: lines 16-504 : Invalid type for field token :
C:\HaxeToolkit\haxe\lib\hxtemplo/3,0,0/templo/Parser.hx:16: lines 16-504 : ruleset : hxparse.Ruleset<Unknown<0>> -> Unknown<0> should be Void -> templo.Token

Suggestion: release the current git as new version.

function calls from template

Hello,
I'm trying to replace the old templo by hxtemplo in my projects, but it can't handle function calls in the view when it's a class instance

class BugHxTemplo
{
	public static function main(){
		
		var str = "Hello ::name:: , ::getRandomText()::";		
		var tpl = templo.Template.fromString(str);

		var view = new View();
		view.name = "Joe";

		Sys.print(tpl.execute(view) );
		
	}
	
}

class View implements Dynamic{
	
	public function new(){}
	
	public function getRandomText(){
		return "random text " + Std.random(100);
	}
	
}

If I replace the view by an anonymous object, it works

...
var view : Dynamic = {};
view.name = "Joe";
view.getRandomText = function() return "random text " + Std.random(100);
...

Copyright issue

Haxe port of Nicolas' templo template engine.

Templo is licensed under LGPL 2.1 or later license.
On haxelib you selected "MIT" as license.
Have you got permission to do that?
LGPL is copyleft, so this repo is licensed under LGPL too.

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.