Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implements the extends keyword for types defined in the dsl. #165

Closed
wants to merge 1 commit into from

Conversation

markbjerke
Copy link

This allows you to inherit from types in the dsl, or from an external type introduced via the define options for a given flow.
#162

Fixes issue with test for extends.

Working to get the tests to pass.

The nools parser test for defines uses a deep equal to a known
structure.  There is a new property in the define parse output, extend:
<typename> , this is null unless there is an actual base class.  Adding
null, trivial change for this.

Implements the extends keyword for types defined in the dsl.
var _createDefined = function (action, defined, scope) {
var _createDefined = function (options, defined, scope) {
var action = options.properties
,proto, base;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comma on previous line

@doug-martin doug-martin added this to the v1.0.0 milestone Jan 26, 2016
if (extend) {
ret.push("var proto = Object.create(flow.getDefined('" + extend + "').prototype); proto.constructor = Defined; Defined.prototype = proto;");
}
else {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

} else {

@markbjerke
Copy link
Author

I am closing this in order to resubmit after removing code that is refactoring in support of this feature and placing it into a separate PR.

@markbjerke markbjerke closed this Jan 29, 2016
@markbjerke markbjerke deleted the add-extends-to-dsl branch February 2, 2016 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants